Category Archives: MicroPython

Transfer Data Log Files from the Raspberry Pi Pico W to Your Desktop PC

Many Raspberry Pi Pico W project in microPython require the logging of sensor data. With these log files, we need a convenient way to transfer the data from the Pi Pico to a desktop PC. In earlier lessons, we showed how to log data to the Pi Pico flash memory. In today’s lesson we show how to transfer those log files to your PC. This is the code we developed in the video lesson.

 

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:

 

Raspberry Pi Pico W GPS Tracker Using Two Cores with Threading

In this video lesson we advance our project by using both cores on the Raspberry Pi Pico W. One core is used exclusively to read the GPS data coming over the UART bus. Then the other core can be used to parse the NMEA sentences, or for other purposes. We are using the following circuit schematic:

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

In this video, we developed the following code: