Smart Board
ESP32-C6 · MPU6050 · Bluetooth LE · MIT

Lean to play.
Don't touch the floor.

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.

4° 16.5° W S A D

Drag the dot, or focus the dial and use the arrow keys. Same thresholds as the firmware.

How it works

One sensor, three ways to use it

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.

Firmware

Game controller

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.

Firmware

Ground-touch warnings

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.

Python tools

Motion recorder

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.

Parts

What you need

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.

PartConnect
ESP32-C6 boardUSB to your computer for flashing
MPU6050 VCC3.3 V
MPU6050 GNDGND
MPU6050 SDAGPIO 17
MPU6050 SCLGPIO 16
Balance boardSensor mounted firmly, any orientation
Build one

Flash it in four steps

  1. Get the code and the ESP32 core

    git clone https://github.com/lakshveerrao/smart-board.git
    arduino-cli core install esp32:esp32
  2. Set your pins

    Put 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.

  3. Compile and upload

    arduino-cli compile --fqbn esp32:esp32:esp32c6 firmware/smart_board_controller
    arduino-cli upload -p COM17 --fqbn esp32:esp32:esp32c6 firmware/smart_board_controller

    Use your board's own port in place of COM17.

  4. Pair and calibrate once

    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!