The code is made such that it can be used for both esp32
and esp8266
boards.
This project combines some of the nice FastLED examples and other home-made animations with a super-basic webserver. The webserver hooks into local WiFi and exposes a simple form to switch the animation on the LED strip (i.e., send POST requests if you do that programatically). WiFi libraries are loaded for the board type that you configure.
In addition to the webserver controller you can change animations via a simple button click, given you solder a button to your board using PIN 22
(that can be changed in the code).
- ESP 32 board. I use the
AZ Delivery ESP32 D1 Mini NodeMCU
- OR: ESP 8266 board. I use the
NodeMCU 1.0
board - LED stripe, at best WS2811 / WS2812. I like the longer ones (300 LEDs +), usually sold as "fairy lights".
- follow the install instructions or consider some datasheets:
- install the necessary GCC extension for
xtensa-elf
(on arch linux that would beaur/xtensa-elf-binutils
andaur/xtensa-elf-gcc
)
- Open the the
webserver-fastled.ino
file. Define the board type you are using by setting the one#define
to1
and uncomment the other one - Enable / disable WiFi webserver and / or the button mode via the corresponding "#define"s
- WiFi only: adjust the WiFi settings for you local WiFi
- Tinker with all the other
#define
s in the code. Change the length of your LED stripe or the LED_TYPE etc... - Flash the code to your board (see the setup section above to install all required dependencies first)
- WiFi only Open the serial monitor, check the prints for the EPS's IP address in your local network. Then open that address in a browser to change the animation of the LED stripe.
- Push the button!
- Have fun!
Most of the FastLED animations are not (solely) made by me. All credits belong to the awesome FastLED team! See here for the FastLED project, the documentation and for some awesome examples that I used in this code. Their code is licensed under the MIT license.
The code for connecting to WiFi and setting up the HTTP webserver is heavily inspired by the esp8266/Arduino webserver examples. All credits for this great work belong to the respective creators! :) For esp8266 related development go check out their docs / repos! Their code is licensed under the LGPL-2.1 License
The code for connecting to WiFi and setting up the HTTP webserver is heavily inspired by theespressif/arduino-esp32 webserver examples. All credits for this great work belong to the respective creators! :) For esp32 related development go check out their docs / repos! Their code is licensed under the GNU Lesser General Public License