I'm trying to wrap my head around FastLEDs, and I've got a basic grasp of it. However, to save pins I'm planning on daisy-chaining multiple sets of lights. So for example, I have four 7-led neopixels and then one 16-led neopixels all on one pin.
FastLED creates an array
CRGB leds[NUM_LEDS];
and that's easy enough to figure out, but for example I want to code pixels 1-7 to blink red, then 8-14 to blink red, then 15-21 to blink red, then 22-28 to blink red, then back to 1-7. While this is going on, the remaining 16 pixels (the other neopixel) will be doing a blue bar that keeps filling up:
for(int dot = 0; dot < POWERCELL_LEDS; dot++) {
leds[dot] = CRGB::Orange;
FastLED.show();
delay(30);
}
// clear this led for the next time around the loop
for(int dot = 0; dot < POWERCELL_LEDS; dot++) {
leds[dot] = CRGB::Black;
//delay(90);
}
How can I code it to do this in, like, a for loop? Because after each of those red lights flashes, it needs to check to see if a button has been pushed (if it has, then increase the rotation of blinking continually).
Any ideas?