This repository contains the hardware and software components of a PIR based tracking device to monitor the usage of local bike trails. The data is sent over LoRaWAN to TTN and from there to a Google Cloud backend which stores the data and provides api endpoints for the data visualization web UI.
I refactored the code to modularization it and decouple it from the Arduino logic.
Every component has now it's own class and handles the state by itself.
BikeCounter (main unit)
DataPackage (handles the protocol stuff)
HAL (hardware abstraction layer / not yet implemented)
LoRaConnector (handles all the LoRa stuff)
StatusLogger (Serves as a debugger)
TimeScheduler (handles the timer stuff)
The Arduino script only configures and uses the loop method of the BikeCounter singleton class.
I refactored the code to modularization it and decouple it from the Arduino logic. Every component has now it's own class and handles the state by itself.
The Arduino script only configures and uses the loop method of the BikeCounter singleton class.