Esp8266/32 Colorful LED Atmosphere Light (Http version)

  • Author: pengqiangsheng
  • Description: Based on tai Chi maker intelligent LED improved, adapted to ESP8266/32 series.
  • Technology stack: Http + FastLed
  • Hardware required: ESP8266 / ESP32 development board + WS2812 lamp belt + 5V switching power supply
  • Note: The power supply must be enough. The lamp belt needs to be powered separately. Power calculation: a lamp 0.3W, 30 lamp beads need 30 * 0.3W = 9W, so the lamp belt driving 30 lamp beads needs a 5V 2A switching power supply.
  • Recommended website: Tai Chi Maker www.taichi-maker.com/
  • Created at: 05/10/2021

Second, the introduction

  • Esp8266/32 Smart LED (Http version) is an intelligent light strip that can be controlled wirelessly through VARIOUS methods such as APP, PC, and Web page.
  • The color, brightness, switch, dynamic color and working mode adjustment of the ribbon can be controlled wirelessly through WIFI using mobile phone applications.
  • Light belt is equipped with a variety of working modes, can static monochrome light your favorite color, can also add joy to your life through dynamic color mode!

Three, the first use must see

3.1 Directory Structure

  • Esp32_DazzleLED // 32 Select this to enter a write
  • Esp8266_DazzleLED // 8266 Select this to enter the firing
  • Img // Sample image

After the project is written to ESP32/8266, you can directly access the OBTAINED IP address:

3.2 the main interface

3.3 Performing Operations on indicator Belts

Click vconsole in the lower right corner; Press F12 on the PC

Iv. Instructions:

character instructions parameters instructions
a Light all LEDS in one color tone 0-255. Set the tone
b Set the brightness 0-255.
c Close the light
d Setting delay Parameters 0-255. Common value 10
e Up/down dynamic mode 0/1 Up = 0, down = 1.
f Set the color wheel 0-255. Only some dynamic effects are affected
g Light flashing Turn on/off blips flicker
h Displays a list of available instructions
i Color palette tone Settings 0-255. Set the palette color to the color close to the tone value
l Set the number of ribbon beads and store them in EEPROM 1-255.
m Set the display mode 0-255. Set dynamic color modes: actually there are only 38:1-38, see strobe_mode function for details
n Set light direction Some dynamic modes such as Matrix and one_sin can set the light direction
p Working mode 0-2 0: fixed mode 1: sequential mode 2: random mode
q Get the version number
r Indicates the status of major system parameters
t Set the color palette mode 0-3 Adjust color palette mode 0= fixed, 1= similar, 2= random
u Play time of each dynamic color 1-255. 1 second – 255 seconds
w Writes the current dynamic mode to EEPROM
*
## 4.1 Command example:
  • /cmd/m/arg/5– Show the fifth dynamic effect (this program defines a variety of dynamic effects can be fixed display can also be shown in turn in order)
  • /cmd/a/arg/80/– Set all strips to the same color and display, tone 80. (Saturation is 255 and brightness is user – defined.)
  • /cmd/p/arg/1– Use the first working mode. The smart light belt has three working modes.
  • Mode 1: fixed mode, that is, fixed display of LED color or dynamic effect set by the user.Copy the code
  • Mode 2: Sequential playback mode. In this mode, the LED will play dynamic effects sequentially.Copy the code
  • Mode 3: Random play mode. In this mode, the LED will randomly play dynamic effects.Copy the code

4.2 Starting use

Directly set the corresponding instructions in webApp.

4.3 Advanced Gameplay

You can build your own page and invoke the corresponding function through routing

4.4 API specification

The call interface is: / CMD/instruction /arg/ parameter, instruction and parameter in instruction description.

Example 192.168.1.7 / CMD/a/arg / 255: set the tone for 255

Functions lacking in the Web App interface can be obtained through routing:

  • /cmd/w/arg/0: Writes the configuration information to the EEPROM
  • /cmd/r/arg/0: Obtains the status of major device parameters
  • /cmd/q/arg/0: Gets the version number
  • /cmd/h/arg/0: Obtain the help document

V. Copyright description

The main code of LED lamp of this project is improved from the intelligent LED of Taiji Maker, and the rest, such as webServer and front-end webApp, are written by myself. The purpose of improvement is to adapt to ESP8266/32 series, which is only used for learning and communication. Please leave an issue if you have any questions.

Firmware package

Esp32 smart configuration firmware is available only at esp32_DazzleLED.ino.esp32.bin

Github address

Github.com/pengqiangsh…