Go Down

Topic: NeoPixel Deco Lights (WS2812 Tutorial via Digispark / ATtiny85) (Read 766 times) previous topic - next topic

smartynov

Recently I was playing with NeoPixel LED strip (WS2812) and created a visually pleasant algorithm I would like to share. The code is well documented and I also created a detailed instruction (on Instructables) with photos and even a video.



In this project I have three "color spots" (reg, green, and blue) which "runs" back and forth along the LED strip with different speeds. When "spots" run across each other, superposition of red, green, and blue results in various colors. Colors of each LED are recalculated many times per second, making the animation look smooth.

The algorithm may be easily customized (via #define's) and supports NeoPixel strips/sets of any length/configuration (however, amount of memory in your MCU and its performance brings in some limitations).

Please take a look: http://www.instructables.com/id/USB-NeoPixel-Deco-Lights-via-Digispark-ATtiny85/ (and yes, I will be happy if you vote for this project in Arduino contest on Instructables)

Please share your ideas of how to improve and extend this project!

larryd

No technical PMs.
The last thing you did is where you should start looking.

larryd

BTW
You have:
long ms = millis();

millis() returns a unsigned long value

No technical PMs.
The last thing you did is where you should start looking.

smartynov

millis() returns a unsigned long value
Indeed! It wont break anything here (except for a jump of color spots position), but will fix it anyway, thank you.

Go Up