A covert communication system that encodes Morse code into subtle brightness variations of an LED using an ESP32, and decodes it from video using Python + OpenCV.
Instead of obvious blinking, this project hides information inside smooth light intensity changes, making it appear like normal ambient lighting to the human eye while remaining machine-decodable.
- Stealth Communication — No visible blinking, only smooth brightness modulation
- ESP32-based Encoder — Real-time LED signal generation using FastLED
- Camera-based Decoder — Extracts hidden data from recorded video
- Adjustable Signal Parameters — Control brightness, speed, and smoothness
- Scene System — Structured phases for calibration, idle, and transmission
- Full Morse Support — A–Z, 0–9, and spaces
The LED never turns fully off. Instead:
Final Brightness = BASE_LEVEL + Pulse Signal
- BASE_LEVEL → constant ambient light (stealth layer)
- DOT / DASH → small and large brightness increases
- Smoothing → gradual rise/fall to avoid sharp transitions
This creates a signal that looks like natural lighting but carries data.
- Select LED region in video
- Extract brightness per frame
- Smooth signal
- Apply threshold detection
- Convert pulses → Morse → text
- ESP32
- WS2812B LED strip (or single LED)
- Camera (phone or webcam)
- Arduino IDE
- FastLED library
pip install opencv-python numpy matplotlibYou can control the behavior using these parameters:
#define BASE_LEVEL 30.0 // Ambient brightness
#define DOT_BOOST 60.0 // Dot intensity
#define DASH_BOOST 140.0 // Dash intensity
#define RISE_SPEED 0.02 // Speed of brightness increase
#define FALL_SPEED 0.04 // Speed of brightness decrease| Parameter | Description |
|---|---|
BASE_LEVEL |
Background light level (higher = more stealth) |
DOT_BOOST |
Brightness increase for dot |
DASH_BOOST |
Brightness increase for dash |
RISE_SPEED |
How fast light rises |
FALL_SPEED |
How fast light falls |
| Mode | Settings |
|---|---|
| Easy Decode | High boosts, faster speeds |
| Balanced | Medium boosts and smoothing |
| Stealth Mode | Low boosts, slow smoothing |
- Raw signal appears as smooth light variation
- Decoder reconstructs Morse sequence
- Final output:
WORLD
- Very low brightness differences may fail detection
- Camera FPS affects decoding accuracy
- Strong ambient lighting can introduce noise
- It is still under development so error can occur
- Work in controlled environment, outside use can produce undesired result
- Need some adjustments before deployment and the environment must be known to user and tested multiple time at different angles
- Adaptive thresholding in decoder
- Real-time decoding (live camera feed)
- Frequency/phase-based encoding
- Multi-LED parallel communication
/esp32
└── led_morse.ino
/python
└── decoder.py
/videos
└── sample.mp4
Some larger files are upload here. Full video (uncompressed – required for decoding): Download here
Feel free to fork, experiment, and improve decoding robustness or stealth techniques.
MIT License
- Inspired by covert optical communication techniques
- Built using FastLED and OpenCV
This project demonstrates how:
Information can be hidden in plain sight using light.
A normal-looking LED becomes a covert communication channel.