PyRasp

← All practice problems

Raspberry Pi Pico practice problem · Raspberry Pi Pico

Listen to the GPS

MediumBudget $30MicroPython

A NEO-6M GPS is wired to the Pico's first UART:

  • GP0 (TX) → GPS RX, GPS TX → GP1 (RX)
  • VCC on 3V3, GND on GND

The module sends NMEA sentences once a second, starting with $GPRMC. Make a UART on those pins at 9600 baud, read one line and print it:

uart = UART(0, baudrate=9600, tx=Pin(0), rx=Pin(1))
line = uart.readline()

More in Raspberry Pi Pico