Wow, works perfectly!
Thanks, Richard! I'm glad you liked it.
What are the practical limits on the number of LEDs that could be lit using a DigiSpark and this sketch?
In terms of hard limits, there are none – the "neopixel" protocol can control any number of LEDs. It takes about 1/30000 of second to send color data to one pixel, so you can update, say, 1000 pixels 30 times per second. Or more than a million once a minute .) But make sure to provide enough power (it is recommended to have a power supply connected each 100-300 pixels).
However, in this sketch most time is spent on math calculations: it recalculates color of each pixel on each redraw. My measurements show that I can get a 20-30 fps (redraws per second) on a 60-LED strip. It means that you can try 100-200 LEDs while maintaining it relatively smooth.
If you need a longer strip, there are two possible solutions: either you can use a more powerful chip (for example, on Raspberry Pi all the calculations will take nearly no time) or we can optimize the code. I think I can make it 5 to 10 times faster by switching to integer calculations only. I was going to do this anyway, so if you need a longer version, please write me and I will find time soon.
Is the waves variable in use in the current version?
No. As you can see, it's commented out. It was my initial idea to create a class that works with any number of "waves", but attiny seems to be too small to handle it properly. Probably I will return to this idea later and create an Arduino visual effects library.
How do I use DEBUG?
You just uncomment the "#define DEBUG" line (remove heading "//"). The only thing it does is lighting one "pixel" white. The number of white LED (counting from strip head) represents current number of redraws per second (I made this because DigiSpark has no hardware UART and it seems to be a simple way to output some values).