Author
SamaySahu,CircuitDigest
ControllingLEDsusing
HandGestures
Learn how to control LEDs using
hand gestures via a webcam.
It uses Python with OpenCV and
MediaPipe to detect hand
gestures, and ESP32 receives
gesture data through serial
communication to control LEDs
accordingly.
A touchless, intuitive interface
for basic LED control.
ComponentsRequired
Hardware:
ESP32 Development Board
Breadboard
Jumper wires
3 x LEDs
3 x 220Ω resistors
USB Cable
Software:
Arduino IDE (for ESP32 code)
Python 3
OpenCV Library
MediaPipe Hand Tracking Module
WorkingPrinciple
A webcam captures live video
feed of the user’s hand.
Python code with MediaPipe
detects the number of fingers
raised.
The number of raised fingers is
sent to the ESP32 via serial.
ESP32 turns ON the
corresponding number of LEDs
(1–3).
For example, 2 fingers raised = 2
LEDs ON.
Assembly&Working
ESP32 GPIOs are connected
to LEDs through resistors.
Each LED is connected to a
specific digital pin (e.g., D13,
D12, D14).
The ESP32 is connected to
the PC via USB for both
power and serial
communication For full code : ESP32 Arduino Code to
Control LEDs with Hand Gesture
ApplicationsofGesture-BasedLEDControlSystem
Touchless Light
Control
Smart Home
Automation
Assistive Technology
Educational Projects
Interactive Art or
Installations
Foramorein-depthtutorial:
https://circuitdigest.com/microcon
troller-projects/controlling-leds-
using-hand-gestures-with-esp32-
and-python
www.circuitdigest.com
Robotics Projects|Arduino Projects|Raspberry Pi Projects| ESP32
Projects | AI Projects | IoT Projects

Hand Gesture Recognition using ESP32 and Python