ESP32 BLE HID controller for virtual cycling platforms
The Virtual Cycling Interface is a program designed for M5Stack Core2 that allows controlling virtual gear shifts on indoor cycling platforms.
The device works as a BLE HID Keyboard, sending key presses to the application.
Note: Since the device is recognized by the system as a keyboard, the focus must be on the virtual cycling platform application for the buttons to work properly.
The program has been tested on MacOS and iPhone, and currently supports key mapping for MyWhoosh. Support for Rouvy and Biketerra is planned.
-
Touchscreen control of virtual gears:
+– shift up one gear-– shift down one gear+3– shift up three gears-3– shift down three gears
-
Physical button control of virtual gears:
- Groove connector, Port A: G32 (
EXT1) and G33 (EXT0)
- Groove connector, Port A: G32 (
-
Audio feedback using the built-in speaker on each action.
- Hardware: M5Stack Core2
- Arduino Libraries:
| Button | M5Stack Core2 Pin |
|---|---|
| EXT0 | G33 |
| EXT1 | G32 |
- Set up Arduino IDE for ESP32.
- Install required libraries (M5Unified, M5GFX, ESP32-BLE-Keyboard).
- Upload the code to the M5Stack Core2.
- After boot, the device will appear as a BLE keyboard and is discoverable under the name:
"Virtual Cycling Interface". - Focus on the virtual cycling platform application (MyWhoosh) and use touchscreen or physical buttons to control virtual gear shifts.
- Add support for Rouvy and Biketerra.
- Enable configurable key mappings for different platforms.
MIT License