Ultra-precise (<1ms) synchronized LED lighting system using ESP-NOW mesh networking on ESP8266 microcontrollers.
This project implements a wireless mesh network of ESP8266 devices that control LED strips with sub-millisecond synchronization. Using ESP-NOW protocol, multiple ESP8266 nodes coordinate to display perfectly synchronized lighting effects across all connected devices.
- Sub-millisecond Synchronization - Lights sync with <1ms precision
- ESP-NOW Mesh - Wireless coordination without WiFi router
- Multi-Device Support - Unlimited number of synchronized nodes
- Low Latency - Direct peer-to-peer communication
- Reliable - No internet connection required
- Scalable - Easy to add more light nodes
Part of a complete lighting control system:
iOS App → ESP32 BLE Hub → ESP8266 Mesh Network
↓ ESP-NOW ↓
[ESP8266] [ESP8266] [ESP8266]
(Synchronized <1ms)
- Lights_ios - iOS control app
- Lights_ESP32 - ESP32 BLE hub coordinator
- ESP8266 Development Boards (NodeMCU, Wemos D1 Mini, etc.)
- LED strips (WS2812B or similar addressable LEDs)
- Power supply (5V for LEDs and ESP8266)
- Optional: Level shifter for LED data signal
- PlatformIO or Arduino IDE
- USB cable for programming
- Multiple ESP8266 boards for mesh
- Clone the repository:
git clone https://github.com/kochcodes/ESP8266MultiDeviceSyncLight.git
cd ESP8266MultiDeviceSyncLight- Build and upload to each ESP8266:
pio run -t upload- Repeat for all ESP8266 nodes in your mesh
Configure your ESP8266 board:
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino- Flash firmware to all ESP8266 devices
- Power on all devices - they auto-discover via ESP-NOW
- Mesh network forms automatically
- Synchronization begins immediately
- Uses ESP-NOW for direct device-to-device communication
- No WiFi router required
- Sub-millisecond latency
- Broadcasts commands to all mesh nodes simultaneously
All devices receive commands at nearly the same instant, ensuring:
- Perfectly timed animations
- Coordinated color changes
- Synchronized effects across all lights
The system can run independently or be controlled by the ESP32 BLE hub which receives commands from the iOS app.
Supports various synchronized effects:
- Solid colors
- Fading
- Rainbow
- Custom animations
ESP8266MultiDeviceSyncLight/
├── src/ # Source code
│ └── main.cpp # Main application
├── platformio.ini # PlatformIO configuration
└── Makefile # Build automation
- Ensure all devices are on the same WiFi channel
- Check ESP-NOW initialization succeeded
- Verify MAC addresses are correctly configured
- Minimize code in interrupt handlers
- Use hardware timers where possible
- Reduce WiFi activity during critical timing
- Synchronization Accuracy: <1ms between nodes
- Maximum Nodes: Limited by ESP-NOW (20 paired devices)
- Range: ~100m line of sight
- Protocol: ESP-NOW (802.11 based)
Open source - check repository for license details.
esp8266 esp-now mesh-network led lighting synchronized iot home-automation platformio wireless