Category Archives: Raspberry Pi Pico

Python Program to Calculate Distance and Heading Between Two GPS Points Using Haversine Formula

In this video lesson we will develop a python program to calculate the distance and heading between any two GPs positions on earth.  The  equations  we will  be  coding  up  are  below:Haversine Formula

The code which we developed is:

 

Portable Power for Your Raspberry Pi Pico W Project Using the Sunfounder Breadvolt

In this video lesson we show how you can power your GPS tracker project from the Sunfounder Breadvolt power supply (order HERE). As explained in the video, never turn the breadvolt on while the Pi Pico is connected to the USB, as this could backfeed current, and damage your computer. Disconnect the USB from the Pi Pico before turning the breadvolt on. Here is our updated schematic for remote operation.

breadvolt
Schematic for Controlling GPS Tracker from the Breadvolt

This is the code we are presently using for the project:

 

Getting Altitude Data from the GPS NMEA Sentences

In this video lesson we show you how you can parse NMEA sentence from your Adafruit Ultimate GPS to get the Altitude of your GPS tracker. At this point, our project has grown to  the point that all our data will not fit on the small OLED screen, so we have also added pushbuttons to allow us to toggle between display screens. For this project we are using the following circuit schematic:

GPS Tracker
This is the schematic we are using as we move forward in the class.

For your convenience, the code developed in the video is below:

 

Getting UTC Atomic Clock Time and Date from GPS and Raspberry Pi Pico W

In this video lesson we show how you can get extremely accurate time reference from your Adafruit Ultimate GPS V3. We show that atomic clock time is encoded in the NMEA sentences, and is in UTC. We show how to retrieve the data, and convert to your local time. In this video I compensated for the clock rolling from one day to the next, for positive UTC correction time, but did not account for clock rollover for negative UTC correction times. Also, several pointed out that you have to also compensate for calendar rollover at the end of the month, and the end of the year. The video shows how we are approaching the problem, and then the code below includes the compensations we did not do in the video. The code is heavily commented so hopefully you will be able to follow it.

Pi Pico GPS
Schematic for our GPS Tracker with OLED Display

For your convenience, the code developed in the lesson is presented below:

 

Raspberry Pi Pico GPS Tracker with OLED Display

In this video tutorial we develop a GPS tracker based on the Raspberry Pi Pico W and the Adafruit Ultimate GPS V3. We include a SSD1305 OLED display. The project will use the schematic below:

Pi Pico GPS
Schematic for our GPS Tracker with OLED Display

For your convenience, the code we developed in the video is included below: