How mohamed-sellami04/hand-led-wifi works
This is a webcam-to-ESP32 controller: the Python application tracks a hand, maps its five fingers to a five-bit state, and sends that state to the ESP32 over HTTP; the firmware validates it and drives five GPIO-connected LEDs. The firmware also turns the LEDs off when Wi-Fi disconnects or commands stop arriving. The Python loop also displays tracking feedback, and sends an all-off state on exit. The source excerpts show both ends of the HTTP interaction; no separate storage or additional device integrations are evident.
Main entry points: hand_control.py Capture and tracking loop · main.cpp HTTP server setup · hand_landmarker.task Landmarker model
Components 12
Hand tracking
- Capture and tracking loop
computer/hand_control.py - Hand landmarker
computer/hand_control.py - Landmarker model
computer/hand_landmarker.task - Finger state mapping
computer/hand_control.py
Python control
- Send scheduling
computer/hand_control.py - HTTP state sender
computer/hand_control.py
ESP32 firmware
- HTTP server setup
src/main.cpp - LED request handler
src/main.cpp - Timeout and Wi-Fi check
src/main.cpp
LED output
- Five LED GPIOs
src/main.cpp
Other components
- Webcam
- ESP32 device
Connections 11
- Webcam → Capture and tracking loop: provides frames
computer/hand_control.py - Capture and tracking loop → Hand landmarker: detects frames
computer/hand_control.py - Hand landmarker → Landmarker model: loads model
computer/hand_control.py - Capture and tracking loop → Finger state mapping: maps landmarks
computer/hand_control.py - Capture and tracking loop → Send scheduling: checks state
computer/hand_control.py - Send scheduling → HTTP state sender: sends when due
computer/hand_control.py - HTTP state sender → ESP32 device: sends HTTP state
computer/hand_control.py - HTTP server setup → LED request handler: routes /leds
src/main.cpp - ESP32 device → HTTP server setup: receives HTTP
README.md - LED request handler → Five LED GPIOs: sets GPIO levels
src/main.cpp - Timeout and Wi-Fi check → Five LED GPIOs: turns LEDs off
src/main.cpp