Hi Folks,
I'm Relatively new to Arduino.
I'm currently working with NeoPixel Strips. I'm using a For Loop to turn on LEDs.
I am trying to make it so as LEDs 0 to 4 will turn on one after the other at the same time as LEDs 5 to 10.
void loop() {
for(int dot = 0; dot < 4; dot++){
// Turn the first led red for 1 second
leds[dot] = CRGB::Red;
FastLED.show();
// clear this led for the next time around the loop
leds[dot] = CRGB::Black;
delay(100);
}
Is it possible to run another For Loop at the same time? Below is the For Loop required to light LED's 5 to 10
void loop() {
for(int dot = 5; dot < 10; dot++){
// Turn the first led red for 1 second
leds[dot] = CRGB::Red;
FastLED.show();
// clear this led for the next time around the loop
leds[dot] = CRGB::Black;
delay(100);
}
The goal is to have LED's 0 and 5 on at the same time followed by 1 and 6, 2 and 7 etc.
Any help on this would be greatly appreciated