Here is the second one : it compiles ok, please try it and tell me.
#include <FastLED.h>
// Define the array of leds
#define LED_DT 6
#define COLOR_ORDER GRB
#define LED_TYPE WS2812
#define NUM_LEDS 150
uint8_t max_bright = 255;
struct CRGB leds[NUM_LEDS];
int N = 5;
void setLEDs (int K, int N) {
for (int i = 0; i < NUM_LEDS; i++) {
if (i % N == K) leds[i].setRGB (127, 0, 0); // set red LED
}
}
void setup() {
delay (1000);
LEDS.addLeds<LED_TYPE, LED_DT, COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(max_bright);
}
void loop() {
FastLED.clear();
for (int i = 0; i < N; i++) {
setLEDs (i, N);
}
FastLED.show();
delay (50);
}
If it works, you'll see red leds moving along your strip. Then we can play with it changing colors.
N = 5 is the interval between lit leds. Anyways, that's what I'm trying to get...
delay(50) sets the speed : increase the number to decrease the speed.
I'm in France, so there's almost no time difference with you. Also not much years... ![]()