How mau-lima/esp32-bike-powermeter works
This ESP32 proof of concept advertises as a bicycle power meter, reads an HX711 load cell, and sends BLE power-characteristic debug values plus simulated crank cadence data. The principal workflow runs through firmware setup and its loop, then the BLE service implementation, which notifies connected bike apps. The README also describes standards-compliant phone-app visibility; sampled source shows the BLE services and notifications. Hardware and BLE-library behavior are external dependencies, so their internal details are not represented.
Main entry points: main.cpp Setup and loop · BLEPowerCSC.cpp Cycling power service
Components 7
Firmware workflow
- Setup and loop
src/main.cpp - Connection flags
src/main.cpp
BLE services
- Cycling power service
src/BLEPowerCSC.cpp - Crank cadence service
src/BLEPowerCSC.cpp
Other components
- Bike app
- HX711 load cell
- ESP32 BLE stack
Connections 10
- Setup and loop → Cycling power service: initializes
src/main.cpp - Setup and loop → HX711 load cell: reads samples
src/main.cpp - Setup and loop → Cycling power service: sends debug value
src/main.cpp - Setup and loop → Crank cadence service: sends cadence
src/main.cpp - Cycling power service → ESP32 BLE stack: creates services
src/BLEPowerCSC.cpp - Cycling power service → Connection flags: updates connection
src/BLEPowerCSC.cpp - Setup and loop → Connection flags: checks connection
src/main.cpp - Setup and loop → Cycling power service: restarts advertising
src/main.cpp - Cycling power service → Bike app: notifies power
src/BLEPowerCSC.cpp - Crank cadence service → Bike app: notifies cadence
src/BLEPowerCSC.cpp