23 lines
597 B
C
23 lines
597 B
C
#include "FastLED.h"
|
|
|
|
#define NUM_STRIPS 2
|
|
#define NUM_LEDS_PER_STRIP 10
|
|
CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];
|
|
#define PIN_STRIP1 34
|
|
|
|
void setupLights() {
|
|
FastLED.addLeds<NEOPIXEL, PIN_STRIP1>(leds[0], NUM_LEDS_PER_STRIP);
|
|
}
|
|
|
|
void loopLights() {
|
|
// This outer loop will go over each strip, one at a time
|
|
for(int x = 0; x < NUM_STRIPS; x++) {
|
|
// This inner loop will go over each led in the current strip, one at a time
|
|
for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
|
|
leds[x][i] = CRGB::Red;
|
|
FastLED.show();
|
|
leds[x][i] = CRGB::Black;
|
|
delay(100);
|
|
}
|
|
}
|
|
} |