Here in KL fireworks are almost dai^H^H^H nightly fun at this time of year (new year, Chinese new year, birthday party, wedding – you name it, there is probably good reason to fire off a shell or two).
In the spirit of New Year and those tons of fireworks exploding out, and in the spirit of over-the-air updates and in the spirit of reusing existing designs – I coded rudimentary fireworks emulation onto my xmas tree LED strip.
Yeah, there are Arduino libraries to run fireworks emulation on led displays and light strips, but after a quick lookup, I found them too complicated and designed for 2D displays – so I went off and made a quick one for 1D version. I wanted each shell to have few states:
- a trail for shell flying to altitude to emulate burning fuse or gunpowder
- a explosion light effect – a light sphere
- finally a random sparcle pattern falling down
And of course, I wanted to keep those existing FastLED color palettes from original xTree. And as quantity rules over quality I wanted to be able to display multiple concurrent explosions.
Does it blend?
Yes, it sure does. After running this emulation for few nights over long night hours, I can confirm that yes, it is indeed less annoying than the usual Chinese 5$ xmas blinky lights. (YMMV: most people are likely more happy with less action in their xmas tree)
Oh yeah, please take a look or re-use my code: https://github.com/takkulan/xtree