An advanced gesture recognition project using the MPU6050 accelerometer to control multiple virtual devices like fans, lights, alarms, and doors — all simulated entirely on Wokwi.
- 🧭 Detect Left, Right, Up, Down, and Shake gestures
- 💡 Turn fan/light ON/OFF with specific tilt directions
- 🚪 Unlock door by holding device still + password gesture pattern (e.g., Left → Up → Right)
- 🔔 Trigger emergency alarm on shake (buzzer)
- 🧪 Fully testable in the Wokwi simulator (no hardware required)
- Arduino UNO
- MPU6050 (Accelerometer + Gyroscope)
- Wokwi Online Simulator
- LEDs + Buzzer
- Embedded C (Arduino IDE)
| Gesture | Action Triggered |
|---|---|
| Tilt Left | Fan ON (Red LED) |
| Tilt Right | Fan OFF |
| Tilt Up | Room Light ON (Yellow) |
| Tilt Down | Room Light OFF |
| Shake | Emergency Alarm (Buzzer) |
| Hold still 2s | Check password pattern |
| Pattern: LUR | Unlock Door (Green LED) |
A predefined motion pattern like
LUR(Left → Up → Right) unlocks the door after 2s of no motion.
- Visit: https://wokwi.com
- Create new Arduino project
- Replace code with
main.ino - Paste
wokwi.jsoninto the project - Click Start Simulation
- Use MPU6050 controls to simulate gestures
Wokwi circuit includes:
- Arduino UNO
- MPU6050 via I2C
- 3 LEDs (Fan, Light, Door)
- 1 Buzzer (Alarm)