Now that I think of it, I'm thinking I could have two arrays. The OFF array and the ON array. Then move the LEDs from one to the other. Is this a good approach?
Then there's the fade down, I need to find an efficient way to choose random on LEDs to turn back off as it fades back down.
My only concern with that is, if I've got 100 LEDs and 99 are on and I need to find that last one by randomly checking, it may take 100 tries or more to find it. Let alone, all the other higher numbers, or lower as I'm going down.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16