//Reacteur 10x20 with moving dot
//Adapted from ArrayOfLedArrays.ino
//https://github.com/FastLED/FastLED/blob/master/examples/Multiple/ArrayOfLedArrays/ArrayOfLedArrays.ino
//Each strip getting its own CRGB array but all parts of an array of arrays.
#include <FastLED.h>
#define NUM_STRIPS 10
#define NUM_LEDS_PER_STRIP 20
CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];
void setup() {
// tell FastLED there's 60 NEOPIXEL leds on pin 2
FastLED.addLeds<NEOPIXEL, 2>(leds[0], NUM_LEDS_PER_STRIP);
// tell FastLED there's 60 NEOPIXEL leds on pin 3
FastLED.addLeds<NEOPIXEL, 3>(leds[1], NUM_LEDS_PER_STRIP);
// tell FastLED there's 60 NEOPIXEL leds on pin 4, etc
FastLED.addLeds<NEOPIXEL, 4>(leds[2], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 5>(leds[3], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 6>(leds[4], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 7>(leds[5], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 8>(leds[6], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 9>(leds[7], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 10>(leds[8], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 11>(leds[9], NUM_LEDS_PER_STRIP);
}
void loop() {
// 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(10);
}
}
}