https://github.com/abdlazeem/hand_gesture_controlled_led
real-time hand gesture recognition system that detects the number of fingers raised using a webcam and controls LEDs connected to an Arduino Uno accordingly.
https://github.com/abdlazeem/hand_gesture_controlled_led
arduino mediapipe-hands opencv python-3
Last synced: about 1 month ago
JSON representation
real-time hand gesture recognition system that detects the number of fingers raised using a webcam and controls LEDs connected to an Arduino Uno accordingly.
- Host: GitHub
- URL: https://github.com/abdlazeem/hand_gesture_controlled_led
- Owner: AbdLAzeem
- Created: 2025-12-18T18:20:44.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-19T01:17:16.000Z (6 months ago)
- Last Synced: 2025-12-21T23:38:14.427Z (6 months ago)
- Topics: arduino, mediapipe-hands, opencv, python-3
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hand_Gesture_Controlled_LED
Python | OpenCV | MediaPipe | Arduino Uno
Overview
This project implements a real-time hand gesture recognition system that detects the number of fingers raised using a webcam and controls LEDs connected to an Arduino Uno accordingly.
Using OpenCV and CVZone (MediaPipe Hand Tracking), the system tracks a single hand, determines finger states, and sends control signals to an external hardware controller. The project demonstrates an effective integration of computer vision, human–computer interaction, and embedded systems.
Features
Real-time hand tracking using a standard webcam
Accurate detection of raised fingers (0–5)
Live video feedback with finger count overlay
LED control via Arduino based on detected gestures
System Architecture
Webcam
↓
OpenCV + MediaPipe (Hand Tracking)
↓
Finger State Detection
↓
Python Controller Module
↓
Arduino Uno
↓
LEDs
Hardware Requirements
Arduino Uno - 5 × LEDs - 5 × 220Ω resistors - Breadboard - Jumper wires - USB cable (Arduino ↔ PC) - Webcam (built-in or external)
Connection Steps:
Connect each LED’s anode (+) to its corresponding Arduino pin via a 220Ω resistor
Connect all cathodes (–) to GND
Connect Arduino to PC via USB
The number of LEDs turned ON corresponds to the number of detected raised fingers.

Software Requirements
Python 3.8+ - Arduino IDE
Required Python libraries: opencv-python - cvzone - mediapipe - pyserial
Usage
Connect the Arduino Uno to your computer
Ensure LEDs are wired correctly
Run the Python script:
python main.py
Hold your hand in front of the webcam
Raise fingers (0–5)
LEDs will light up according to finger count
Press K to exit the application