Tag Archives: Adafruit Ultimate GPS

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:

 

Connecting the Adafruit Ultimate GPS to the Raspberry Pi Pico W

In this video lesson we will connect the Adafruit Ultimate GPS to the Raspberry Pi Pico W, and will write a simple program to capture the data being sent by the GPS. In this lesson, we simply want to read and print the NMEA sentences coming off the GPS, and then in future lessons we will begin to parse the data, and turn the data into usable numbers. This is the schematic for connecting the GPS to your Raspberry Pi Pico W.

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

Then this is the simple code we developed to allow reading the data coming from the GPS.

 

Getting Geared Up for the Ultimate GPS Tracker with Raspberry Pi Pico W

GPS Project
Gearing Up for the Ultimate GPS Challenge

Guys in this class we will be building the Ultimate GPS Tracker. This will build on all you learned in our most excellent Raspberry Pi Pico W class, and now we will begin working on a real project. Hopefully most of the gear you will already have from the various kits you already have, but I give amazon links to the gear we will be using in the project. You Will Need:

LESSON 30: Advanced Software Interrupt Techniques for Reading Serial Data with Arduino

In Lesson 28 and Lesson 29 we showed how to use simple software interrupts to do quick and easy tasks like turning an LED on or off. We emphasized the importance of just doing simple tasks, and to get in and out of the interrupt function as quickly as possible. It is sometimes necessary to do more sophisticated functions. For example, the Adafruit Ultimate GPS immediately begins sending serial data on powerup. Making matters worse, it sends big bursts of data, and then waits, and then later sends bursts of data again. The data that is sent needs to not just be read, but you must parse the data to make sense of it. Hence, you end up needing to do sophisticated functions to parse the data, but at the same time you have to make sure you do not miss any of the new incoming data. This requires a more thoughtful and sophisticated interrupt strategy.

First off, we will need a better software interrupt library. You should erase the TimerOne library you installed in Lesson 28, and replace it with the one here:

https://github.com/PaulStoffregen/TimerOne

The video shows how to get the library if you are not familiar with github.

The video takes you through the code below. While this is done for the Adafruit GPS, this method should work for other sensors that spew serial data.

While we do this demo for the Adafruit GPS, these techniques will work for other sensors that send data over the Serial Pins.

Beaglebone Black GPS Tracker LESSON 5: Displaying Data from GPS in Google Earth

Google Earth GPS
Example of GPS Data displayed in Google Earth

In the earlier lessons in this series we learned how to hook the Adafruit Ultimate GPS up to the Beaglebone Black. In these lessons we got the hardware working, got to the point we could take data, and then got the NMEA sentences parsed, so that we could display understandable data for Latitude, Longitude, and Altitude. In this lesson we will show you how to create a GPS tracker, by logging your GPS data to a file on the Beaglebone Black. Then when you get back home, you can load the data into google earth to see an interactive view of where you have been.

The video shows step-by-step how to get the code working, starting with the code we developed in Lesson 3. We end up with the following program:

 This program should create a file on the Beaglebone Black, and track your longitude, latitude and altitude.

In order to view the file on Google Earth, you will want to put a KMZ wrapper on the coordinates. A reasonable KMZ wrapper is below. Simply take your coordinates from the program above, and paste them in the file below, in the area between <coordinates> and </coordinates>