6.2 Flowing Light¶
Have you ever wanted to add some fun and interactive element to your living space? This project involves creating a running light using WS2812 LED strip and a obstacle avoidance module. The running light changes direction when an obstacle is detected, making it an exciting addition to your home or office decor.
Required Components
In this project, we need the following components.
It’s definitely convenient to buy a whole kit, here’s the link:
Name |
ITEMS IN THIS KIT |
LINK |
---|---|---|
ESP32 Starter Kit |
320+ |
You can also buy them separately from the links below.
COMPONENT INTRODUCTION |
PURCHASE LINK |
---|---|
- |
|
Schematic Diagram
The WS2812 LED strip is composed of a series of individual LEDs that can be programmed to display different colors and patterns. In this project, the strip is set up to display a running light that moves in a particular direction and changes direction when an obstacle is detected by the obstacle avoidance module.
Wiring
Code
Note
You can open the file
6.2_flowing_led.ino
under the path ofesp32-starter-kit-main\c\codes\6.2_flowing_led
directly.Or copy this code into Arduino IDE.
This project extends the functionality of the 2.7 RGB LED Strip project by adding the ability to display random colors on the LED strip. Additionally, an obstacle avoidance module has been included to dynamically change the direction of the running light.