In the summer of 2026, I began biking more, which led me to think how I could bridge my new passion for biking with my passion and coursework involving computer science.
After thinking about it for a while, I decided to dig up my old robotics components from years ago to figure out what worked and didn't work.
I came up with the idea of designing my own GPS bike tracker, which could save the coordinates of the bike every second on a trip, and could sync with a web application when the device reconnects to the internet.
I began to brainstorm and write down ideas for my project, and compared various ways I could execute it. I had all the main parts I needed, and noted what I would need to buy.
The final debate rested over the main brain behind the project: would I use an Arduino Nano (which I have) or a Raspberry Pi Zero (which I would have to purchase) ?
After some thinking, I decided to use a Raspberry Pi. It would give me the opportunity to learn basic Linux shell scripting, connect to the a WiFi network more easily, and save data to a memory card without an external module.
After buying and grouping together all the parts I needed, I began work on my project.
I began with testing my VK-162 GPS module in the Raspberry Pi terminal using cgps. Once I got that out of the way, I installed the python3-gps library and tested the GPS by creating a sample Python script:
import gps
session = gps.gps(mode=gps.WATCH_ENABLE | gps.WATCH_NEWSTYLE)
while True:
report = session.next()
if report["class"] == "TPV":
if hasattr(report, "lat") and hasattr(report, "lon"):
print(f"Latitude: {report.lat}")
print(f"Longitude: {report.lon}")
if hasattr(report, "speed"):
print(f"Speed: {report.speed * 3.6:.2f} km/h")
if hasattr(report, "alt"):
print(f"Altitude: {report.alt:.2f} m")
print("-" * 30)I then wired up my 16x2 LCD screen to the Raspberry Pi and tested that too.

I also had a push button with a large cap available, which I connected to the Pi's GPIO pins using jumper wires.
With the testing of the GPS device, and the LCD out of the way, I can begin programming.
For my first prototype, I simply wanted the ability to start/stop trips (using the button), display current trip number/status on the LCD, and save the coordinates registered by the GPS device onto a local SQLite database or a CSV file.
After a lot of tweaking and testing, I managed to create a very basic prototype for the bike tracker. Packaged in a cardboard box, the button and the LCD display are accessible to the user. There are holes on the side for the GPS wire and a power supply.
I experimented with the Adafruit LCD Python library, and found it was much simpler than the code I currently had.
I combined this with the GPS testing code, a local SQLite database, and functionality for the pushbutton, and finally had a working prototype for the project.
At this stage, the bike tracker turns on and waits for a button to be pressed, which starts a trip. An entry is placed in a SQLite table called trips, containing the current trip's start time and ID. Every second, a new entry is placed in another SQLite table called gps_points. This table stores the tracker's GPS coordinates every second, alongside the time, speed, and the trip ID which this entry is associated with.
After the local database functionality was complete, I implemented the Supabase sync feature. The Raspberry Pi checks for a WiFi connection every once in a while. If it finds one, it syncs each trip, then each GPS point one-by-one, and sets each row's synced value to 1, so that it never resyncs, even if the Pi shuts down midway.
Once all this was done, I tested the tracker from my window, then in real life. I developed a simple Vite + React web app to display trips and GPS points from Supabase, alongside statistics such as speed and trip time.
The entire project can be found on my GitHub profile. Thanks for reading!