Here I have a small program with a single led moving along a strip, I want to add a 2nd led to move along the strip with 5 leds spaces between them. What do I need to add to the program to achieve this?
[code]
//Leds chase forwards along strip
#include <FastLED.h>
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define NUM_LEDS 60
#define DATA_PIN 5
#define BRIGHTNESS 32
CRGB leds[NUM_LEDS];
unsigned long delayPeriod = 50;
void setup() {
delay(2000);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); // GRB ordering is typical
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB::Red;
FastLED.show();
leds[i] = CRGB::Black;;
delay(delayPeriod);
}
}
[/code]