ESP32 rainbow lamp: 16 WS2812 LEDs, a speed knob and a mode button
Open in the lab ▸Make my own copy
Sixteen addressable LEDs on one data wire. The ESP32 sends each LED its own colour with the Adafruit_NeoPixel library; the SPEED pot moves the rainbow faster or slower and MODE steps through rainbow, single colour and a running dot. The 330 Ω resistor in the data line and the 1000 µF capacitor across the strip’s supply are the two parts every WS2812 build should have. Open the ESP32 to read and change the sketch.
What is on the bench
7 parts, 12 wires, with a sketch (the program runs in the lab). Boards: ESP32 DevKit.
| ESP32 DevKit | 1 |
|---|---|
| USB charger / port | 1 |
| WS2812 LED strip | 1 |
| Resistor | 1 |
| Electrolytic capacitor | 1 |
| Potentiometer | 1 |
| Push button | 1 |
Put it on your page
The project runs live inside the frame: readers can press buttons, turn knobs and read the meters.
<iframe src="https://zencircuitlab.com/embed/zclrainbow16" width="100%" height="560" style="border:1px solid #2f363a;border-radius:10px" loading="lazy" title="ESP32 rainbow lamp: 16 WS2812 LEDs, a speed knob and a mode button on Zen Circuit Lab"></iframe>
Link
https://zencircuitlab.com/p/zclrainbow16
Published by its author under the lab's community terms: it may be opened, copied and changed by anyone. Simulation results are for learning; check a real build against the parts' datasheets.