# ESP32-Strobe-Master

> ESP32-Strobe-Master is a high-precision embedded firmware and real-time web dashboard engineered to exploit the stroboscopic effect, allowing users to visually freeze, reverse, or alter the perceived motion of spinning fan blades or emulate certain frequencies through light.

- Author: zahid-arman
- Platform: ESP32
- Board: DOIT ESP32 DEVKIT V1 (`esp32:esp32:esp32doit-devkit-v1`)
- SDK version: 3.3.6
- Tags: #esp32, #light, #optical illusion, #time stopper, #stroboscope, #effect
- Created: 2026-09-10
- Updated: 2026-09-10
- Favorites: 1, forks: 0
- Project page (view, flash from the browser, fork): https://flashesp.com/explore/F91q6QqXieZbH7EX6mg0G
- Download all sources (zip): https://flashesp.com/api/public-projects/F91q6QqXieZbH7EX6mg0G/download-sources/

## Source files

- [ESP32-Strobe-Master.ino (8.8 KB)](https://flashesp.com/explore/F91q6QqXieZbH7EX6mg0G/files/pYtCNdZoKeR0PqWSjUa6Q.md)
- [index_html_gz.h (98.8 KB)](https://flashesp.com/explore/F91q6QqXieZbH7EX6mg0G/files/7hV3DWLto0AxqlqxzIBhg.md)
- [libraries_lock.json (231 B)](https://flashesp.com/explore/F91q6QqXieZbH7EX6mg0G/files/QZpLghm9UNje1FktAf5of.md)
- Readme.md (3.5 KB)

## README

# ⚡ ESP32-Strobe-Master

An ultra-precise, web-controlled ESP32 stroboscopic light generator engineered to exploit the [stroboscopic effect](https://www.google.com/search?q=stroboscopic+effect). Visually freeze, reverse, or manipulate the perceived rotation speed of spinning ceiling fans, water streams, vibrating strings, and mechanical equipment.

---

## 🌟 Key Features

* **Sub-Hertz Frequency Precision:** Micro-step tuning from 1.00 Hz to 200.00 Hz with 0.01 Hz resolution.
* **Microsecond Duty-Cycle Control:** Pulse widths down to 0.1% duty cycle to eliminate motion blur and deliver razor-sharp frozen frames.
* **Embedded Flash Web App:** Single-file HTML5/JS dashboard gzipped directly into ESP32 `PROGMEM`— zero external filesystem flashing required.
* **Real-time Canvas Physics Engine:** Integrated 2D optical illusion simulator to model fan RPM, blade counts, and temporal aliasing offline.
* **Live System Telemetry:** Real-time WebSocket streaming of free heap memory, CPU frequency, uptime, and hardware pin state.
* **Profile Manager:** Save, load, and delete custom preset profiles stored as JSON inside LittleFS flash memory.
* **Hardware Safety Guardrails:** Strict GPIO pin mapping that restricts output exclusively to safe PWM pins, protecting bootloader pins.

---

## 📐 How It Works

When a rotating object spins at frequency *f*<sub>target</sub>, flashing a high-intensity light at frequency *f*<sub>strobe</sub> produces temporal aliasing:
*f*<sub>observed</sub> = |*f*<sub>target</sub> - *k* · *f*<sub>strobe</sub>|

Where *k* is an integer harmonic.

| Condition | Visual Result |
| :--- | :--- |
| ***f*<sub>strobe</sub> = *f*<sub>target</sub>** | **Frozen Motion** – Blade illuminated in the exact same spatial orientation every turn. |
| ***f*<sub>strobe</sub> < *f*<sub>target</sub>** | **Slow Forward Crawl** – Blade illuminated slightly ahead on each pulse. |
| ***f*<sub>strobe</sub> > *f*<sub>target</sub>** | **Slow Reverse Crawl** – Blade illuminated slightly behind on each pulse. |

---

## 🛠️ Hardware Requirements & Circuit

### ⚡ Quick Setup vs. High-Power Setup
* **Minimal Setup (For Testing & Low-Light Demos):**
  * For low light expermiments, connect a standard LED directly to an ESP32 GPIO pin with a 220 Ω current-limiting resistor in series. You can also test this without extra wiring by targeting the ESP32 onboard LED (typically **GPIO 2**).
  
* **High-Power Setup (Recommended for Freeze Effect):**
  * To produce flash pulses bright enough to freeze larger targets (like ceiling fans or room lighting) without motion blur, use an external high-power LED driver circuit with a MOSFET.
---

## How to use it?
 * Flash the firmware to your ESP32.
 * Power on the board and connect to the Wi-Fi Access Point:
   * SSID: ESP32-Strobe-Master
   * Password: strobe1234
 * Navigate to your ESP32's ip address, mostly [192.268.4.1](http://192.168.4.1) in any modern web browser.
 
## ⚠️ Safety Warning
When the stroboscopic effect visualizes a fast-spinning ceiling fan or mechanical power tool as stationary, the object is still rotating at full speed.
 * Physical Danger: Never attempt to touch, clean, or obstruct moving blades or mechanical assemblies that appear frozen by strobe light.
 * Photosensitivity Warning: High-brightness flickering light can trigger seizures in individuals with photosensitive epilepsy. Use caution and avoid direct eye exposure.
 
## 🏷️ License & Credits
### Distributed under the MIT License. Developed for makers, embedded systems engineers, and physics enthusiasts.
