gitmyhub

CardputerGPSMap

Python ★ 14 updated 13d ago

Offline map for Cardputer ADV

A hobby firmware and PC-side Python converter that puts an offline OpenStreetMap GPS map on the tiny M5Stack Cardputer device, no internet required, shows your position, pan and zoom, built around tight memory constraints.

PythonC++OpenStreetMapM5Stacksetup: moderatecomplexity 3/5

CardputerGPSMap is a hobby project that puts an offline GPS map on the M5Stack Cardputer ADV, a small handheld device about the size of a business card with a tiny keyboard and screen. The project was built as a personal challenge, written almost entirely from scratch after the author ran into memory and performance problems with an earlier GPS display project.

The device has no PSRAM, which is extra memory that would normally make this kind of map rendering practical. Working around that constraint is a recurring theme in the README, and the author spent considerable time optimizing how the map is drawn so the device stays responsive. The result is described as a doomsday offline map: it works without internet, and if you load the right map tiles, it will show your GPS position on an actual map of wherever you are.

To use it, you need two things. First, on your computer: download a map file from OpenStreetMap, run it through a Python converter included in the project, and copy the output files to an SD card. Second, on the Cardputer: flash the provided firmware file. Once running, the device waits for GPS satellites, then switches to map mode where you can pan, zoom, and check your current position.

The Python converter on the PC side handles turning OpenStreetMap data into the tile format the device expects. A standard version and a lightweight version are both included. The zoom level you choose when converting controls how much detail and storage space the map uses: a lower zoom level like z12 gives city-level detail and is described as sufficient for most casual use, while higher levels show individual streets but require more space and conversion time.

The project notes this is a toy and not a replacement for proper navigation equipment in emergencies. It works best with the official LoRa hat for the Cardputer, but the core map and GPS features work without it.

Where it fits