I have created a code for a strip of WS2811. The code is using 5 LEDS. What i would like to do is duplicate the code multiple times along the strip. From what i gather i need to be using arrays. I have tried to look this up but there appear to be many ways of doing this. Can anyone please suggest the best option. Below is my code so far. Thank you
#include <FastLED.h>
#define NUM_LEDS 5
#define LED_PIN 3
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2811, LED_PIN, BRG>(leds, NUM_LEDS);
FastLED.setBrightness(250);
}
void loop() {
for(int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB (150, 40, 0);
FastLED.show();
delay(45);
leds[i] = CRGB::Black;
}
for(int i = NUM_LEDS - 1; i >= 0; iā) {
leds[i] = CRGB (150, 40, 0);
FastLED.show();
delay(45);
leds[i] = CRGB::Black;
}
}