6.5’ white tree with 250 WS2811 RGB LEDs, driven by an ESP8266 microcontroller using the FastLED library, controlled with a web app over WiFi and/or an infrared remote control.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Added new palette waves pattern. Added min and max value for number f… Nov 27, 2016
.gitignore Added build and OTA deploy scripts. Nov 22, 2016
Commands.h More work on meteor patterns and IR remote improvements. Dec 13, 2016
FSBrowser.h Initial commit. Oct 27, 2016
Field.h Added new palette waves pattern. Added min and max value for number f… Nov 27, 2016
Fields.h Added new palette waves pattern. Added min and max value for number f… Nov 27, 2016
GradientPalettes.h Initial commit. Oct 27, 2016
LICENSE Initial commit. Oct 27, 2016
Map.h fix for more than 255 leds + map.h generator script (#19) Dec 12, 2017
Meteors.h fix for more than 255 leds + map.h generator script (#19) Dec 12, 2017
Noise.h fix for more than 255 leds + map.h generator script (#19) Dec 12, 2017
README.md Update README.md Nov 24, 2016
TwinkleFOX.h Fixed crashes/resets with more than 255 LEDs. Dec 31, 2017
Twinkles.h Adjusted patterns, added params for fire/water sparking and cooling, … Oct 28, 2016
build.sh More work on meteor patterns and IR remote improvements. Dec 13, 2016
deployapp.sh Adding meteor pattern (still a work in progress). Dec 12, 2016
deployfirmware.sh Adding meteor pattern (still a work in progress). Dec 12, 2016
elapsedMillis.h Initial commit. Oct 27, 2016
generate_map_h.py fix for more than 255 leds + map.h generator script (#19) Dec 12, 2017
ip.txt Renamed scripts for clarify. Added a data file for defaulting the ip … Nov 22, 2016
power.sh Added a simple script to power the tree on or off (defaults to off). … Nov 23, 2016
tree-v2.ino Fixed crashes/resets with more than 255 LEDs. Dec 31, 2017
uploadfile.sh Added 'simple', kid-friendly mode, related to issue #10 Nov 23, 2016
web-app-simple-thumb.png Fixing web app images. Nov 24, 2016
web-app-simple.png Fixing web app images. Nov 24, 2016
web-app-thumb.png Fixing web app images. Nov 24, 2016
web-app.png Fixing web app images. Nov 24, 2016

README.md

Tree - v2

White xmas tree with 250 8mm WS2811 RGB LEDs, driven with an ESP8266, and controlled via a web app over Wi-Fi and/or IR remote control.

Demo Videos:

Demo Videos

More details and build instructions: https://www.evilgeniuslabs.org/tree-v2.html

Hardware

  • 250 x 8mm WS2811 Addressable RGB LED string
  • WeMos D1 mini pro ESP8266 development board:

WeMos D1 mini pro

Features

  • Turn the LEDs on and off
  • Adjust the brightness
  • Change the display pattern
  • Adjust the color

Web App

Web App Simple 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 in SPIFFS (on-board flash memory).

The web app is a single page app with separate files for js and css, using 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.

Infrared Remote Control

Control via infrared remote control is also supported, via the ESP8266 port of the IRremote library.

Compiling

Follow the instructions on the following pages to install the required software for your OS (Windows, Linux, Mac):

  1. Install Arduino
  2. Install Arduino core for ESP8266

Download and install the following libraries, using the instructions here: https://www.arduino.cc/en/Guide/Libraries

Download the source code here.

In Arduino, choose the following options from the Tools menu:

  • Board: WeMos D1 R2 & mini
  • Flash Size: 4M (3M SPIFFS)
  • CPU Frequency: 160MHz
  • Upload Speed: 921600

Select the correct port for your board (it's easiest to unplug any other USB serial devices).

Finally, click the Upload button. Please report any errors, problems, questions, etc to the Issue Tracker.

SPIFFS

The web app needs to be uploaded to the ESP8266's SPIFFS. You can do this within the Arduino IDE after installing the Arduino ESP8266FS tool.

With ESP8266FS installed run the sketch and then upload the web app using the ESP8266 Sketch Data Upload command in the Arduino Tools menu.

Compression

The web app files can be gzip compressed before uploading to SPIFFS by running recompress.sh or the following command:

gzip -r data/

The ESP8266WebServer will automatically serve any .gz file. The file index.htm.gz will get served as index.htm, with the content-encoding header set to gzip, so the browser knows to decompress it. The files can be decompressed for editing with this command:

gunzip -r data/

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. It can run in connected or standalone access point modes.

Support

Please report any errors, problems, questions, etc to the Issue Tracker.