PyRasp

← All practice problems

Raspberry Pi Pico practice problem · Raspberry Pi Pico

Read the GPS type

MediumBudget $30MicroPython

The GPS on GP0/GP1 sends NMEA sentences such as $GPRMC,…. Read one line and print just the sentence type — the three characters after $GP and before the first comma, so $GPRMC prints RMC.

Remember the line is bytes; decode those three characters before printing.

More in Raspberry Pi Pico