Tag Archives: UART

Getting Latitude and Longitude from the Adafruit Ultimate GPS with Raspberry Pi Pico W

In this video lesson I show how to get usable Latitude and Longitude from the Adafruit Ultimate GPS version 3 using the Raspberry Pi Pico W. We read the NMEA sentences from the GPS, we parse them into individual strings for each sentence, and then we create arrays of data from the strings. Then we begin to parse the arrays, and convert the confusing numbers into useful Decimal Degree values for Latitude and Longitude.

Pi Pico GPS
This schematic shows how to connect the Adafruit Ultimate GPS to the Raspberry Pi Pico W

For your convenience, this is the code we developed in todays lesson:

 

Incorporating an Adafruit Ultimate GPS into your Raspberry Pi Pico W Project

In this video lesson we will show you how to connect and begin to get data from your Raspberry Pi Pico W connected to an Adafruit Ultimate GPS. The circuit schematic presented below. Notice Tx on the Pi Pico goes to Rx on the GPS, and Rx on the Pi Pico goes to Tx on the GPS.

Pi Pico GPS
This schematic shows how to connect the Adafruit Ultimate GPS to the Raspberry Pi Pico W

Then this is our initial code which reads the data from the GPS one byte at a time and prints it. In future lessons we will explain how to get useful information from this data, but for now, this code will allow you to read the data:

 

Beaglebone Black GPS LESSON 2: Sending Commands to the Adafruit GPS Module

Adafruit GPS
Adafruit Ultimate GPS Connected to the Beaglebone Blak

In lesson 1 we showed you how to connect the Adafruit Ultimate GPS breakout board to the Beaglebone Black and how to read the NMEA sentences streaming off the GPS over the UART pins. In this lesson we will show you how to send commands to the GPS to better tailor its operation for our needs. There are a number of commands that can be sent to it. Some of the things we we can control are the baud rate it communicates at, and the rate that it takes and sends data. We can also influence which NMEA sentences it sends.  In this video we will go over the different commands we can use.

To review, you should connect the GPS as follows:

Beaglebone GPS
Adafruit Ultimate GPS connected to the Beaglebone Black Rev C Microcontroller

The video explains the code step-by-step, but here it is for your reference.

This code sets the GPS to communicate at baud rate of 57600, and set it to read and report 5 readings a second. It then sets the GPS to only report the $GPRMC and the $GPGGA sentences. It then constantly reads and reports the NMEA sentences.