Pablo Garcia
← All projects
Hackathon

TrailBuddy

A Raspberry Pi virtual pet that joins you on walks and streams your route live with GPS

Role
Hardware and device software
Stack
Raspberry Pi 5, Python, GPIO, GPS, Pillow, SQLite, FastAPI
Team members
Samuel Olarte, Xavian Martin, Laeh Pimentel

The idea

TrailBuddy started with a simple question: what if you always had a friend to walk with? It combines the nostalgia of caring for a virtual pet with a reason to get outside. Instead of staying home, your pixel-art cat comes along on your walk, and walking keeps it happy.

We built it at Knight Hacks IX at UCF. It was our first hardware project, from the same team that formed at the Bloom Knights Hackathon a few months earlier.

What I built

I handled the hardware and all the code running on the device:

  • Wiring a Raspberry Pi 5 to an OLED screen, a GPS module, and an arcade button
  • An animated cat on the 128×64 screen, with a pet menu to feed it and pet it as its hunger and happiness change over time
  • A walk mode showing the pet, time, distance, and GPS status as it records your route
  • Live streaming of GPS points to our FastAPI backend during a walk, which my teammates built along with a React map that visualizes routes
  • A local SQLite queue on the Pi, so points recorded without a connection are saved and sent once it reconnects

Challenges

A GPS that wouldn’t talk. The GPS module was wired to the Pi’s serial pins, but no data came through. On the Pi 5, the default serial device points to a debug port instead of the header pins, so I found the correct port and the readings started flowing.

Rebuilding the device for live data. The device and the backend were built in parallel, and we’d misunderstood each other: I built the Pi to save a walk and upload it at the end, while the backend was designed to receive points live during the walk. On top of that, the data didn’t match: the Pi used numeric IDs and Unix timestamps, while the backend expected UUIDs, ISO timestamps, and a different point structure. I reworked the device code to stream and convert each point in real time, and kept local storage as an offline queue so no walk data is lost if the connection drops.

Networking on a hackathon floor. At first, the Pi had to reach a backend running on a laptop over a phone hotspot, which meant the server had to accept outside connections and Windows Firewall had to let them through. For the final demo, I moved the backend onto the Pi itself and started it at boot, so the whole demo needed only the device and a phone.

Result

By the end of the hackathon, TrailBuddy was a working prototype: the cat has animations, hunger, and happiness, and the Pi records real GPS walks, streams them live to the backend, and keeps them saved after a restart. Seeing the first complete walk come through was one of the most rewarding moments of the weekend.

The demo went well. The judge liked the idea and gave us one clear piece of feedback: a real device needs a real enclosure, not components out on a breadboard. A 3D-printed case is the first thing on our list for the next version.

We also built more than we could connect in time, like ghost racing against a friend’s route, safety check-ins, and public trail discovery, which the backend already supports. The biggest lesson was that hardware and software integration depends on agreeing on data formats early.