This project converts an ESP32-C3 Supermini into a Bluetooth Low Energy (BLE) AirMouse using the BMI160 IMU sensor. It allows you to control your computer or mobile device cursor by moving the device in the air. The setup also supports left and right mouse clicks via buttons.
- BLE mouse control using ESP32-C3 Supermini
- Motion sensing via BMI160 (accelerometer + gyroscope)
- Adjustable sensitivity and deadzone
- Supports left and right click buttons
- Works on Windows, Linux and Android. (note: it don't work on iphone,ipad)
- ESP32-C3 development board
- BMI160 sensor
- Two push buttons for left/right click
| Component | ESP32-C3 Pin |
|---|---|
| BMI160 SDA | 8 |
| BMI160 SCL | 9 |
| BMI160 VCC | 3.3V |
| BMI160 GND | GND |
| Left Button | 4 |
| Right Button | 5 |
Ensure the BMI160 is powered by 3.3V. Connect the GND of the sensor to the ESP32-C3 ground.
-
Libraries (install via Arduino Library Manager):
- DFRobot_BMI160
- BleMouse
- Wire (comes with Arduino)
- Connect the ESP32-C3 and BMI160 as per wiring above.
- Connect buttons for left and right mouse click.
- Upload the Arduino sketch.
- Power on the ESP32-C3; it will advertise as a BLE mouse.
- Pair with your device and start controlling the cursor using motion.
- Sensitivity and deadzone values can be adjusted in the sketch.