Skip to content

Tiuipuv/esp8266-fastled-dedicated-webserver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastLED + ESP8266 + Dedicated Web Server

Control many addressable LED strips with an ESP8266 via a web browser.

NOTE: If you would like to try the original master branch by jasoncoon, you can find it here. The instructions for the master are found in the Readme file.

Hardware Used

ESP-01 development board Addressable LED strip
Addressable LED strip

Other hardware:

Recommended by Adafruit NeoPixel "Best Practices" to help protect LEDs from current onrush:

Features

  • Manage multiple Neopixel Strips
  • Turn the NeoPixels on and off
  • Adjust the brightness
  • Change the display pattern
  • Adjust the color

Web App

Web App

Patterns are requested by the app from the ESP8266, so as new patterns are added, they're automatically listed in the app.

The web app is stored on the local server. The server files are found in the Web Server root directory.

Audio services are found in the Audio Server root directory.

The web app is a single page app that uses jQuery and Bootstrap. It has buttons for On/Off, a slider for brightness, a pattern selector, and a color picker (using jQuery MiniColors). Event handlers for the controls are wired up, so you don't have to click a 'Send' button after making changes. The brightness slider and the color picker use a delayed event handler, to prevent from flooding the ESP8266 web server with too many requests too quickly.

By hosting on a local server, there is virtual no limitation to file size / app scalability, and changes are very easy to manage.

Installing

Arduino setup

  1. Install the Arduino IDE which can be downloaded here.

  2. Add ESP8266 boards to Arduino Ide.

    • Click File > Preferences and copy and paste the URL "http://arduino.esp8266.com/stable/package_esp8266com_index.json" into the Additional Boards Manager URLs field.
    • Click OK. Click Tools > Boards: ... > Boards Manager.
    • Find and click on ESP8266 (using the Search function may expedite this). Click on Install.
    • Click on Close and then select your ESP8266 board from the Tools > Board: ... menu.
  3. Clone this repository using Git, or just download and extract as a zip.

  4. Install the following libraries. They must either be downloaded from GitHub and placed in the Arduino 'libraries' folder, or installed as described here by using the Arduino library manager.

  5. Create a Secret.h file in the ino sketch's folder. Add the following code, replacing with your ap and password list:

APList wifiAPs = {
  {"WIFI_SSID_NAME", "WIFI_PASSWORD"},
  {"WIFI_SSID_NAME2", "WIFI_PASSWORD2"} //optional, add as many as you want
};
  1. Modify RoomSpecific.h to match your different rooms' led count and voltage requirements. Change this selection at upload time through the CURRENT_ROOM constant.
  2. Upload code to your esp through selecting the appropriate com port. after the first upload, wifi upload should become available.

Web server setup

  1. Install node js from here (LTS)

  2. Start the server by running node static_server.js from the server folder.

  3. Verify the server is running by typing http://localhost/ into your browser.

Audio server setup (optional, but recommended)

  1. Install Visual Studio 2019, C sharp development packages
  2. Use NuGet to install NAudio
  3. Use NuGet to install Accord.Audio
  4. Run the program
  5. Verify using the UDP tester App included in the Web Server folder.

REST Web services

The firmware implements basic RESTful web services using the ESP8266WebServer library. Current values are requested with HTTP GETs, and values are set with POSTs using query string parameters.

About

Modification to support dedicated web server and SPIFFS removal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C++ 34.6%
  • JavaScript 32.4%
  • C# 10.8%
  • C 9.7%
  • HTML 6.5%
  • CSS 6.0%