Adafruit Feather M0 LoRa is programmed using Arduino IDE
TinyGPS library talks to the Adafruit Ultimate GPS featherwing to retrieve position and current timestamp.
Pulse Per Second hardware output from GPS triggers an interrupt routine on the M0 to synchronise transmission slots across all devices.
- Set flag for 'transmit required=TRUE'
- Configure LoRa and GPS serial
- Determine our timeslot for sending telemetry.
Await valid GPS fix before continuing
- If 'transmit require' flag is set AND the current timestamp is within our timeslot
- transmit our packet.
- update device location when bytes on serial from GPS are available
- construct a data packet ready for transmission
- Device ID - Voltage (from onboard resistor divider) - position - fix status
- get the current (number of seconds past the minute) from GPS