GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsThe LG290P from Quectel tracks GPS, GLONASS, Galileo, BeiDou, QZSS and NavIC on four frequency bands and can do RTK when given corrections. SparkFun's Flex system puts it on a module that plugs into the GNSS Flex pHAT, which connects its UART to the Pi's header. This project enables the Pi's serial port, reads the NMEA sentences in Python and prints position, satellites used and fix quality.
Tick anything you already have and the total updates.
SparkPNT GNSS Flex module with LG290P
Follow the colours: red is power, dark grey is ground, blue is a signal.
From the Pi through the header.
gnss.pyimport serial, pynmea2
PORT = "/dev/serial0"
BAUD = 460800 # check the hookup guide for your module's default
with serial.Serial(PORT, BAUD, timeout=1) as s:
while True:
line = s.readline().decode(errors="ignore").strip()
if not line.startswith("$") or "GGA" not in line[:6]:
continue
try:
m = pynmea2.parse(line)
except pynmea2.ParseError:
continue
print(f"lat {m.latitude:.7f} lon {m.longitude:.7f} alt {m.altitude} m "
f"sats {m.num_sats} fix {m.gps_qual} hdop {m.horizontal_dil}")
The serial port is still used by the login shell; recheck raspi-config.
The baud rate is wrong; try 115200 and 460800.
The antenna cannot see enough sky, or a passive antenna is fitted.
RTK fixed, centimetre level; it needs a correction stream from a base or NTRIP.
Yes, the LG290P supports India's NavIC system.
No, use a multi-band active GNSS antenna for best results.
4 parts: SparkFun GPS-28137 GNSS Flex pHAT for Raspberry Pi, SparkPNT GPS-28139 GNSS Flex Module w/ LG290P, Quad-Band RTK, Raspberry Pi 4 Model B 2GB RAM Single Board Computer and Official Raspberry Pi 32GB A2 Class Micro SD Card. On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 2 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (gnss.py).
About ₹26,216 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
What NMEA sentences are; Why multi-band GNSS is more accurate; Using the Pi's UART from Python.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.