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+

ESP32 Starter Kit

You can also buy them separately from the links below.

COMPONENT INTRODUCTION

PURCHASE LINK

ESP32 WROOM 32E

BUY

ESP32 Camera Extension

-

Jumper Wires

BUY

Obstacle Avoidance Module

BUY

WS2812 RGB 8 LEDs Strip

BUY

Schematic Diagram

../../_images/circuit_6.2_flowing_led.png

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

../../_images/6.2_flowing_light_bb.png

Code

Note

  • You can open the file 6.2_flowing_led.ino under the path of esp32-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.