Salutations! I am trying to program a WS2812B with 64 leds. What I want to do is have the lights light up one at a time, in a chase effect; once they are all lit up, have them all blink a couple times; then stay on. Haven't decided on colors yet, but I will play around with that. I am looking for suggestions so I can do more with less lines of code. So far I have been experimenting with code to get the hang of it. Here is what I have at the moment:
that is sort of what I did, but again I was experimenting with the code to get the idea. Not really sure how to draw the schematic but it it simple, the matrix itself is controlled with only a Vin, Vout, and a data cable controlling all 64 leds. I will try the millis though, thank you. anyone got any other suggestions
For controlling ledstrip there are so many ways, personally i don't use FastLED, simply because it allows 'writing beyond the size of the array' but let's try and prevent that. Using millis90 there are 2 main methods, either wait until a moment since the last update has passed and take the next step, or take a 'zero-moment' value and keep calculating where you should be from that. I do the latter. We can start with doing a flash
I haven't used any of the included pattern (or brightness) function of FastLED simply because i think it is better to see how such a function can be used. The sketch is setup as non-blocking call to PlaySequence() The function FlashLeds does either a smooth flash or a hard flash. And the other 3 functions are "helper functions" that we may use in other functions as well. It compiles, but i haven't actually tested it, i don't have a setup here to do that instantly, and writing a bit of code takes time enough.