Sitemap
Huseyn Hasanov

Huseyn Hasanov

Computer Engineering | Cybersecurity | Embedded Systems | AI | Computer Vision

Member-only story

Controlling LEDs with Hand Gestures Using Python and Arduino

2 min readOct 26, 2026

Introduction

I recently completed a project that combines computer vision with electronics. The goal was to control LEDs using hand gestures detected through a webcam.

For this project, I used Python to detect my fingers and an Arduino Uno to control five LEDs in real time.

Press enter or click to view image in full size

Technologies and Components

Software:

  • Python
  • * OpenCV
  • * MediaPipe
  • * PyFirmata2

Hardware:

  • Arduino Uno R3 CH340
  • * 5 LEDs
  • * 5 resistors
  • * Breadboard
  • * Jumper wires
  • * Webcam

How Does It Work?

The project combines computer vision and hardware control in a simple system.

  1. Hand Detection

OpenCV captures video from the webcam, while MediaPipe detects the hand and identifies its 21 landmarks.

2. Finger Recognition

Python processes the detected landmarks to determine which fingers are raised. Each finger is represented by a binary value: 1 for a raised finger and 0 for a lowered…

--

--

Huseyn Hasanov
Huseyn Hasanov

Written by Huseyn Hasanov

Computer Engineering | Cybersecurity | Embedded Systems | AI | Computer Vision