[ESP8266] Xmas tree lights

This year I improved my christmas tree LED lights from last year.

I removed the Infineon MCU (XMC1100) which already was at it’s limits and replaced it with an ESP8266.
So i put the cool and versatile WiFi enabled MCU under my xmas tree, featuring an ugly, crude web interface using ESP8266WebServer (i am no web dev at all) and ported the old code from the XMC1100 over.
Porting was just a task of ten minutes to be honest.

The most time consuming part was all the stuff like adding SPIFFS+JSON based configuration saving, configuration parameter web interface, NTP time sync with ON/OFF times, and a dozen hours of debugging resets.

Using the Arduino port for ESP8266 development is very easy, but be warned:
Even if you just use 70% of your RAM, all the new/delete stuff of C++ will
fragment that memory so fast that you might face reboots every day.

In my case using the webinterface’s setup screen once allocated so many objects that all further allocations led just one step further to heap exhaustion.
then weird things happen.

Anyway, it was a nice this year’s xmas project and looks very appealing.
A beautiful purple light with smooth transitions fading slowly up and down from time to time makes it very special.

Here a short video showing some different modes (more or less pretty ones)

(and it uses the same code base as my kitchen floor lights https://youtu.be/ea7AFVHCEq0)

Leave a Reply