Category Archives: Raspberry Pi Pico

Portable GPS Data Tracker Using the Raspberry Pi Pico W

In today’s video we show how to run your GPS tracker remotely by saving the program as main.py, and powering from the Sunfounder Breadvolt power supply.  We also show how to prevent the problem of main.py locking up the serial port. We do this by adding a ‘kill switch’, that terminates the main.py program, so the log file can be transferred to your PC.

This is the schematic used for today’s lesson.

GPS Tracker
Schematic for Controlling GPS Tracker from the Breadvolt

For your convenience, this is the code we developed in today’s video.

 

Logging GPS Data on Your Raspberry Pi Pico W GPS Tracker Project

In this lesson I show you how to log GPS data to the flash memory on your Raspberry Pi Pico W. This allows you to not only know where you are, but to also know where you have been. In this lesson, this is the schematic of your project circuit.

GPS Tracker
Schematic for Controlling GPS Tracker from the Breadvolt

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

 

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.

 

Logging Data On Your Raspberry Pi Pico Using Flash Memory

In this video lesson, We show you how to log sensor data on your Raspberry Pi Pico W. We will start with simple read and write functions, and then show you how to write and read files line by line, and keep a log of your sensor data.

Our first program is very simple, and just shows how to write a line of data, and read a line of data the the Pico’s flash memory. Here is the code we used in the video for the first simple example.

In the second example, we show greater complexity by writing and reading a file, line by line. Each line contains comma delimited sensor data.

In these first two examples, when we open the file as ‘w’, the existing data is erased and a new file is created. In the example below, we open an existing file, and show how to append new data to the existing file without erasing the old data.

 

Measure Distance Between Two GPS Points with the Haversine Equations

In this video lesson we show how we can modify our GPS tracker project to calculate the distance between any two GPS points. User presses the onboard button to log the first data point. Then the user travels to the next point, and then presses the button again. The system calculates the distance between those two points, and the heading angle between the first and second point.

This is a schematic of the circuit we are using:

GPS Tracker
Schematic for Controlling GPS Tracker from the Breadvolt

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