This project allows an ESP32 to connect to a Wahoo KICKR CORE smart trainer and control the virtual gears using the builtin feature instead of simulating the wheel diamater or the resistance. It uses Bluetooth Low Energy (BLE) to communicate with the KICKR. This code has been tested with the FW version 1.5.36
- Connects to a KICKR CORE trainer via BLE.
- Controls and retrieves the gears.
- Includes basic riding data retrieval (power, cadence, speed, heart rate).
- Supports hardware buttons for gear control.
- ESP32 development board. It was tested with an ESP32 C3.
- Wahoo KICKR CORE smart trainer.
- Two momentary push buttons for gear control.
- Arduino IDE with ESP32 board support.
- BLE library for ESP32 (included with ESP32 board support).
- Install the ESP32 board support in the Arduino IDE.
- Go to
File
>Preferences
. - Add
https://dl.espressif.com/dl/package_esp32_index.json
to the "Additional Boards Manager URLs" field. - Go to
Tools
>Board
>Boards Manager
. - Search for "ESP32" and install the "esp32 by Espressif Systems" package.
- Go to
- Clone this repository to your local machine.
- Open the
kickr_esp32.ino
file in the Arduino IDE. - Change the [
GEAR_RATIOS
] as desired fromkickr_constants.h
. - Ensure the correct board is selected (
Tools
>Board
>ESP32 Dev Module
or similar). - Upload the code to your ESP32.
- Power on your KICKR trainer.
- Open the Serial Monitor in the Arduino IDE (set baud rate to 115200).
- The ESP32 will scan for the KICKR and attempt to connect.
- Once connected, use the hardware buttons to change gears.
- The Serial Monitor will display connection status, current gear, and other debug information.
DEVICE_NAME
inkickr_constants.h
: Change this if your KICKR has a different name.GEAR_CHANGE_INTERVAL
inkickr_constants.h
: Adjust the interval between gear changes (in milliseconds).GEAR_RATIOS
inkickr_constants.h
: This array defines the gear ratios that will be sent to the KICKR. You can customize these values to match your desired virtual gearing.DEBOUNCE_TIME
inkickr_constants.h
: Set to 20ms for responsive button handling.GEAR_LONG_PRESS_NUM_SHIFTS
inkickr_constants.h
: Number of gears to shift during a long press.
- Failed to connect:
- Make sure your KICKR is powered on and not connected to any other devices.
- Verify that the
DEVICE_NAME
inkickr_constants.h
matches the name of your KICKR.
- No data received:
- Double-check the BLE service and characteristic UUIDs in
kickr_constants.h
. - Ensure that notifications are enabled for the data characteristic.
- Double-check the BLE service and characteristic UUIDs in
- Implement a user interface (e.g., web interface or mobile app) to control the KICKR.
- Support external bluetooth buttons.
This project is licensed under the MIT License.