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%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nicholas Schmidt 68849fdc19
All checks were successful
CI / lint-c (push) Successful in 8s
CI / lint-js (push) Successful in 9s
CI / test-js (push) Successful in 4s
CI / security (push) Successful in 5s
CI / build (push) Successful in 3m0s
docs: update README with correct button mappings, CI jobs, and new screenshots
2026-06-13 15:13:03 -04:00
.forgejo/workflows ci: fix lint-c PEP 668, build toolchain install, add unit tests 2026-06-13 14:58:54 -04:00
.githooks Add CI pipeline: lint, build, and pre-commit hook 2026-06-13 14:05:28 -04:00
screenshots docs: update README with correct button mappings, CI jobs, and new screenshots 2026-06-13 15:13:03 -04:00
src Pebble GPS coordinates app with OSM vector map 2026-06-13 13:58:55 -04:00
tests ci: fix lint-c PEP 668, build toolchain install, add unit tests 2026-06-13 14:58:54 -04:00
.gitignore Add CI pipeline: lint, build, and pre-commit hook 2026-06-13 14:05:28 -04:00
appinfo.json Pebble GPS coordinates app with OSM vector map 2026-06-13 13:58:55 -04:00
eslint.config.js Add CI pipeline: lint, build, and pre-commit hook 2026-06-13 14:05:28 -04:00
package.json Add CI pipeline: lint, build, and pre-commit hook 2026-06-13 14:05:28 -04:00
README.md docs: update README with correct button mappings, CI jobs, and new screenshots 2026-06-13 15:13:03 -04:00
test_gps.py Pebble GPS coordinates app with OSM vector map 2026-06-13 13:58:55 -04:00
test_osm_map.py Pebble GPS coordinates app with OSM vector map 2026-06-13 13:58:55 -04:00
wscript Pebble GPS coordinates app with OSM vector map 2026-06-13 13:58:55 -04:00

GPS Coordinates Pebble App

GPS Coordinates Screen OSM Vector Map

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 120)
  • 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

  1. The JavaScript companion app runs on your phone (via Pebble mobile app)
  2. It uses the phone's GPS via navigator.geolocation.watchPosition()
  3. GPS coordinates are sent to the watch via Pebble.sendAppMessage()
  4. The watch app receives coordinates and formats them in 3 systems
  5. Display updates automatically as new GPS data arrives
  6. When Up is pressed, the companion fetches street data from the Overpass API
  7. Street nodes are packed into a compact binary format and sent to the watch
  8. 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