Skip to content

Nothingtodo02/Interactive-LED-Control-using-Python-and-Arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Interactive LED Control using Python & Arduino πŸ’‘πŸ€–

Overview

This project utilizes OpenCV and CVZone in Python to detect hand gestures via a webcam, sending commands to an Arduino. The Arduino controls LEDs based on the number of fingers visible, enabling real-time, interactive LED control through computer vision and serial communication.

Features ✨

  • Hand Gesture Recognition using OpenCV & CVZone πŸ–οΈ
  • Real-Time Finger Detection & Counting πŸ”’
  • Serial Communication with Arduino πŸ”„
  • Dynamic LED Control Based on Finger Count πŸ’‘
  • Live Visualization of Hand Gestures πŸ“Ή

Project Structure πŸ“‚

πŸ“ LED-Control-Using-OpenCV-Arduino
│── ide.m.ino        # Arduino code for LED control
│── main.py         # Python script for gesture detection & communication
│── LED control live demo.mp4  # Demonstration video
│── README.md       # Project Documentation

Hardware Requirements πŸ› οΈ

  • Arduino UNO
  • LEDs
  • Resistors
  • Jumper Wires
  • USB Cable for Arduino
  • Webcam

Installation & Setup βš™οΈ

  1. Clone the repository:
    git clone https://github.com/yourusername/LED-Control-Using-OpenCV-Arduino.git
  2. Install the required Python dependencies:
    pip install opencv-python cvzone mediapipe pyserial
  3. Upload ide.m.ino to your Arduino UNO using the Arduino IDE.
  4. Connect the hardware components as per the circuit diagram.
  5. Run the Python script:
    python main.py

Usage πŸš€

  1. Start the Python script to detect hand gestures.
  2. Hold your hand in front of the webcam and raise fingers to control LEDs.
  3. The number of raised fingers determines which LED(s) will turn on.
  4. The program will continuously update the LED states in real time.
  5. Press ESC (ASCII 27) to exit the program and close the video feed.

Live Demo πŸŽ₯

Live Demo

Contributions 🀝

Feel free to fork the repository, submit issues, or suggest improvements for better real-time detection and control.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published