Short demo app I built using local LLM for testing out the capabilities of my Framework Desktop
- JavaScript 41.5%
- C 39.6%
- Python 15.4%
- Shell 3.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| .githooks | ||
| screenshots | ||
| src | ||
| tests | ||
| .gitignore | ||
| appinfo.json | ||
| eslint.config.js | ||
| package.json | ||
| README.md | ||
| test_gps.py | ||
| test_osm_map.py | ||
| wscript | ||
GPS Coordinates Pebble App
A Pebble smartwatch app that displays GPS coordinates in 3 major coordinate systems and shows a scrollable OpenStreetMap vector map with a location pin.
Features
GPS Coordinates
- DD (Decimal Degrees): 37.7749° N, 122.4194° W
- DDM (Degrees Decimal Minutes): 37° 46.494' N, 122° 25.164' W
- DMS (Degrees Minutes Seconds): 37° 46' 29.64" N, 122° 25' 9.84" W
- All 3 formats displayed simultaneously
- Displays accuracy in meters
- Works offline (GPS data cached on watch)
OSM Vector Map
- Press Up to open map view (press Back to return)
- Fetches street data from OpenStreetMap's Overpass API
- Color-coded streets for easy navigation:
- Red: Motorways
- Orange: Trunk roads
- Yellow: Primary roads
- Green: Secondary roads
- Blue: Tertiary roads
- White: Residential streets
- Blue location pin at center
- Up/Down to zoom in/out (zoom level 1–20)
- Auto re-fetches map data at new zoom level
Building
Requires Pebble SDK installed:
pebble build
Installing
pebble install # Install on phone-connected watch
pebble install --emulator basalt # Install on emulator
Testing
Test scripts for the emulator:
# Send simulated GPS coordinates
python3 test_gps.py
# Fetch real OSM streets and send with GPS
python3 test_osm_map.py 37.7749 -122.4194 --zoom 5
# Run JavaScript unit tests (requires Node.js 20+)
node --test tests/test-map-data.js
Viewing Logs
pebble logs
Project Structure
├── .forgejo/workflows/
│ └── ci.yml # CI: lint-c, lint-js, test-js, security, build
├── .githooks/
│ └── pre-commit # Local pre-commit checks
├── screenshots/
│ ├── screenshot_gps.png # GPS coordinates display
│ └── screenshot_map.png # OSM vector map view
├── src/
│ ├── c/
│ │ └── gps_coords.c # Watch app (C)
│ └── pkjs/
│ └── index.js # Phone companion (JS)
├── tests/
│ └── test-map-data.js # JS unit tests (color, bbox, packing)
├── test_gps.py # Send test GPS data to emulator
├── test_osm_map.py # Fetch OSM streets and send to emulator
├── package.json
├── wscript
└── appinfo.json
How it Works
- The JavaScript companion app runs on your phone (via Pebble mobile app)
- It uses the phone's GPS via
navigator.geolocation.watchPosition() - GPS coordinates are sent to the watch via
Pebble.sendAppMessage() - The watch app receives coordinates and formats them in 3 systems
- Display updates automatically as new GPS data arrives
- When Up is pressed, the companion fetches street data from the Overpass API
- Street nodes are packed into a compact binary format and sent to the watch
- The watch renders streets as colored polylines with a centered location pin
Permissions
The app requires location permission on your phone. Grant it when prompted by the Pebble mobile app. The map feature also requires internet access (via the phone's connection) to fetch OSM data from the Overpass API.
CI Pipelines
The repository includes Forgejo Actions workflows (.forgejo/workflows/ci.yml):
- lint-c: C code linting with cpplint
- lint-js: JavaScript linting with eslint
- test-js: JavaScript unit tests with Node.js test runner
- security: Secret scanning with gitleaks
- build: App build with pebble SDK
A pre-commit hook (.githooks/pre-commit) runs lint and build locally:
git config core.hooksPath .githooks

