There may be no more familiar sight in bike racing than the breakaway, the rider or riders who boldly jump ahead of the peloton in a race’s opening kilometers and attempt to steal a victory. - bicycling.com
This project allows a Peloton bike to be used as a standard Bluetooth indoor cycling trainer, so it can be used with apps like Zwift, or otherwise recorded. Importantly, this also frees up the bike screen for other uses, such as playing YouTube videos, Netflix Shows, or - my favorite - baseball games on MLB.tv.
- Install
esp-idf(Guide here) - Run
idf.py build(useidf.py flashto program a connected ESP32 with the USB bootloader) - View debug console with
idf.py monitor
To communicate with the Peloton, you need an RS232 line transceiver. I used the TRS232 from Texas Instruments.
components/ble-trainerimplements a BLE Peripheral device with the Cycling Power Servicecomponents/event-handlermain application logic glue between the serial and bluetooth layerscomponents/peloton-serialmaincontains the program entrypoint and starts the other applications