A balance board that pairs with your computer as a Bluetooth keyboard. Lean and it presses W, A, S or D. Let the edge hit the ground and the keys let go.
Drag the dot, or focus the dial and use the arrow keys. Same thresholds as the firmware.
An MPU6050 inside the board reads gravity 100 times a second. The firmware works out how far and which way you're leaning, relative to a calibration you do once.
Shows up as a Bluetooth keyboard called Smart Board. Lean past 4° to press a key, ease back under 3° to release it. Diagonals press two keys.
Within 3° of the ground angle (about 19.5°) for 200 ms counts as a touch: keys release and you get a warning. The third touch locks the keys until you're centred, for 5 s at most. 20 s clean clears your warnings.
The stream firmware sends gx,gy,gz,ax,ay,az,timestamp every 50 ms. A logger saves it to CSV, and a labelling app records takes like touch_left or circle for training a model.
Any ESP32-C6 board works. MPU6500-type clones that report chip ID 0x70 instead of 0x68 are fine. If yours is wired differently, the included I2C scanner finds the pins.
| Part | Connect |
|---|---|
| ESP32-C6 board | USB to your computer for flashing |
| MPU6050 VCC | 3.3 V |
| MPU6050 GND | GND |
| MPU6050 SDA | GPIO 17 |
| MPU6050 SCL | GPIO 16 |
| Balance board | Sensor mounted firmly, any orientation |
git clone https://github.com/lakshveerrao/smart-board.git
arduino-cli core install esp32:esp32Put your SDA and SCL GPIOs into I2C_SDA and I2C_SCL at the top of firmware/smart_board_controller/smart_board_controller.ino. Not sure? Flash firmware/i2c_scan first and read the Serial Monitor at 115200.
arduino-cli compile --fqbn esp32:esp32:esp32c6 firmware/smart_board_controller
arduino-cli upload -p COM17 --fqbn esp32:esp32:esp32c6 firmware/smart_board_controllerUse your board's own port in place of COM17.
Pair Smart Board in your Bluetooth settings. Then hold BOOT for 2 s, step on within 4 s, stand level and still, and lean forward firmly until it says Calibrated and saved. Play!