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.json
into 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)
