Fireworks in xmas tree, why not!

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.

Fireworks emulation

Lifetime of one fireworks shell

Lifetime of one fireworks shell

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:

  1. a trail for shell flying to altitude to emulate burning fuse or gunpowder
  2. a explosion light effect – a light sphere
  3. 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

(under Photon file xtree2.ino – rest of the code is reused from original)