Raspberry Pi practice problem · I²C, SPI, UART & 1-Wire
Cold start
EasyBudget $20Python · gpiozero
After power-up a GPS module needs time to find satellites. Until then its $GPGGA sentence has fix quality 0; once it has a fix the quality is 1 or more and the sentence says how many satellites are in use.
Build: a GPS module on the UART (TX → RXD/GPIO15, RX → TXD, 3V3 power).
Program: read /dev/serial0 at 9600 baud. For every $GPGGA sentence print either
Searching...
while the fix quality is 0, or, once there is a fix:
Fix with 7 satellites
In the test the module gets its fix after 3 s, using 7 satellites.
Tip: pynmea2's GGA object has gps_qual and num_sats (a string such as "07", so convert it with int()).