I’ve got a strip of 60 LEDs in a circle for a clock, but I want to define LED 30 as the start of the array, and LED 0 as the 31st pixel in the array (so the wire coming out of the circle is at the bottom)
Is there a way to define that setup in the FastLED.addLeds statement, or do I need to do the “if leds[n] is greater than 30, subtract 30, else add 30” to every line that I draw a pixel? Cause that will get old fast. Thanks for the help!
The second method with two arrays looks like it’ll be the way to go, putting everything in to one single line at the bottom of the page instead of screwing with every access of the array. Thanks for the super quick reply too! (:
Mike, in this case, no it’s not, since there’s a wood frame involved with the connection at the bottom, and no extra room to run wires (or even a wire) around to the top. So I have to do it in software.
I’m going to be doing something similar with a circle of LEDs connected at the bottom, and I’m considering having a clock function.
My thinking is that I use the leds[(i+30)%60] method to calculate the position of the hour, minute, and second hands. Just three quick calculations, not too bad. Then the rendering of the pattern that makes up those hands (and perhaps the 12 stationary carats) can all be done in units referenced to the bottom for clean code.