Skip to content

JamesEHart/Pathfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinder

A MicroPython GPS navigation device built on the Raspberry Pi Pico. An 8-LED NeoPixel ring acts as a directional indicator — pointing north in compass mode, or toward the nearest trail waypoint in navigation mode.

Hardware

Component Connection
8x NeoPixel ring GPIO 0
GPS module (UART) RX → GPIO 5, 9600 baud
HMC5883L magnetometer SDA → GPIO 28, SCL → GPIO 29

Modes

Compass mode (COMPASS_MODE = True): one LED always points magnetic north.

Navigation mode (COMPASS_MODE = False): once a GPS fix is acquired, the device loads trail waypoints from yosemite-trails.geojson within a 2 km radius and points the LED toward the nearest one.

Startup sequence

  1. 10-second magnetometer calibration — slowly rotate the device through a full circle while the LEDs chase around the ring.
  2. North LED blinks 5 times so you can orient the device physically.
  3. Main loop begins.

Configuration

Edit the constants at the top of main.py:

NUM_LEDS = 8               # number of LEDs in the ring
NORTH_LED = 4              # which LED index faces "forward" on the device
COMPASS_MODE = True        # True = compass, False = navigate to waypoint
NEARBY_RADIUS_M = 2000     # radius in metres to scan for waypoints
REFRESH_EVERY_MS = 10000   # how often to re-scan the waypoint file

Waypoints

Trail data is stored in yosemite-trails.geojson (standard GeoJSON format). The parser streams the file in 256-byte chunks to keep RAM usage low, so large files are fine. To use a different area, swap in any GeoJSON file with LineString or MultiLineString features and update the GEOJSON filename constant.

Flashing

Use the MicroPico VS Code extension (.micropico config is included). Copy main.py and yosemite-trails.geojson to the root of the Pico's filesystem.

About

MicroPython GPS trail navigator on a Raspberry Pi Pico - compass mode, NeoPixel direction ring, streaming GeoJSON parser, runs on battery

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages