script for logging average speed, instantaneous speed, and total distance traveled by a bike. It uses a hall effect sensor to detect wheel rotations and calculates the speed and distance based on the wheel's circumference.
- Microcontroller with uPython support (e.g., Raspberry Pi, ESP32)
- Hall effect sensor module
- Connect the hall effect sensor to the microcontroller.
- Run the script.
- The script will log the average speed, instantaneous speed, and total distance traveled to
log.txt
every time the wheel completes a rotation.
GND -> GND
VCC -> 3V3
D0 -> GPIO5