Introduction: LED Strip Snowflake / Star Animations
A small guide on how I built a Christmas decoration with LEDs strips I had left over from another project. Plan, software and animations files are provided. This project was inspired by the following youtube video.
Step 1: Model the Snowflake / Star
First step was to plan a support structure for the LEDs this was done with Inkscape. The concept is to have a Snowflake with a Star inside. Width was chosen to be the width of two strips to be able to create everything with one strip going back on itself.
Step 2: Build Support
The support is built out of wood and assembled with hot glue.
Step 3: Soder LED Strips
LEDs strip are cut to the right length for each segment and then soldered together with prepared wires. This took a long time and I would recommend taking LEDs on a wire instead of cutting up strips.
Step 4: LEDs Driver
In this project the LEDs are not driven by an Arduino, but a NodeMCU board (ESP8266) with MicroPython on it.
The first step is top flash the micropython firmware following this guide: Getting started with MicroPython on the ESP8266. It is then possible to use it to drive the LEDs like shown in 11. Controlling NeoPixels.
On my board Machine.pin(4) is D2 (as can be seen on the picture). Do not forget to connect the gnd with the LEDs.
Step 5: Software and Animations
The software written in Python can be downloaded on my GitHub.
The main.py file handles animation playback. It can have a clock mode where time is displayed as percentage of number of LEDs. And there are also all the animations shown in the video which can be copied from the animations.txt file. The animations make us of the snowflake_esp.py module which has a Snowflake class to easily adresse entire parts of the structure. It is therefore possible to control all the LEDs together or only the star part, or tree, leaf or trunk of each arm, down to the individual LED.
from snowflake_esp import *sf = Snowflake(0) off = Color(0, 0, 0) def wait(ms): time.sleep(ms/1000.0) --- big and small star with snowflake transition y = Color(255, 220, 0) sf.paint(off) sf.star.color(y) wait(1000) sf.star.paint(off) sf.trees.color(w) wait(1000) sf.trees.trunk.paint(off) sf.trees.leaf.color(y) wait(1000)