Transform your ESP32 into a fully functional Bluetooth Low Energy (BLE) Cycling Power Meter compatible with popular cycling apps and devices.
This project implements the BLE Cycling Power Service on ESP32, allowing the device to broadcast power measurement data to cycling apps like Zwift and fitness devices like Garmin bike computers. It includes all required BLE characteristics and services to emulate a professional cycling power meter.
- ✅ Full BLE Cycling Power Service implementation
- ✅ Compatible with Cycling Power Profile (CPP) specification
- ✅ Real-time power data transmission
- ✅ TFT display support for local data visualization
- ✅ Button controls for interface interaction
- ✅ Support for multiple ESP32 boards (TTGO-T1, TinyS3)
The BLE device has been successfully tested with:
- Zwift (iPhone, iPad, macOS)
- Other cycling apps supporting standard BLE power meters
- Garmin Edge 130 bike computer
- iPhone/iPad (iOS devices)
- MacBook Pro (macOS)
All platforms detected the device and worked without issues.
- TTGO-T1 (ESP32 with TFT display)
- UM TinyS3 (ESP32-S3 based board)
- Any ESP32 board with BLE support
- TFT display (for TTGO-T1 variant)
- Buttons for control input
- Power sensor/strain gauge (if measuring actual power)
- PlatformIO installed
- USB cable for programming
- ESP32 board
-
Clone the repository: ```bash git clone https://github.com/kochcodes/ESP32_BLE_CyclingPowerMeter.git cd ESP32_BLE_CyclingPowerMeter ```
-
Open the project in PlatformIO (VS Code): ```bash code . ```
-
Select your environment in `platformio.ini`:
- `ttgo-t1` for TTGO-T1 boards
- `s3` for TinyS3 boards
-
Build and upload: ```bash pio run -t upload ```
Update the upload port in `platformio.ini`: ```ini upload_port = /dev/cu.usbserial-XXXXX # macOS/Linux
upload_port = COM3 # Windows ```
- Power on the ESP32 - The device will start advertising as a BLE Cycling Power Meter
- Open your cycling app (Zwift, TrainerRoad, etc.)
- Search for sensors in the app's settings
- Select the ESP32 device from the list of available power meters
- Start your ride - Power data will stream to the app
- Go to Settings → Sensors → Add Sensor
- Select Power
- Choose the ESP32 device from the list
- Confirm pairing
``` ESP32_BLE_CyclingPowerMeter/ ├── src/ # Source code ├── platformio.ini # PlatformIO configuration ├── gui.ipynb # Jupyter notebook for data visualization └── README.md # This file ```
- TFT_eSPI (^2.5.33) - Display library for TFT screens
- Button2 (^2.2.4) - Button handling library
Dependencies are automatically managed by PlatformIO.
- Ensure BLE is enabled on your app/device
- Check that the ESP32 is powered on and running
- Verify the ESP32 is not already connected to another device
- Check power supply stability
- Reduce distance between ESP32 and receiving device
- Ensure no interference from other 2.4GHz devices
This project is open source. Check the repository for license details.
`esp32` `ble` `cycling` `power-meter` `zwift` `fitness` `iot` `bluetooth` `garmin`