Hopefully this question makes sense. I have a ring of LEDs (a strip that has its ends touching). I’m trying to do the typical if (abs(index-variable1) < variable2
to determine which LEDs are within a set distance from an index number, but it doesn’t jump smoothly around the corner where the indices go from 299 to 0.
I’m guessing this is a really common problem and there is a relatively simple way of doing the math so that it doesn’t matter, but I end up with a convoluted mess that doesn’t actually work.
This is where I got before deciding that there must be a better way to do this and to just post here:
I know that fastpulse running on a 1D strip does what I’m talking about, but looking at the code I’m not sure the reason it does applies to what I am trying to do.