I’m using an Arduino Uno and a fastLed WS2812B. I have the leds set up correctly. Every 2 seconds, the lights pause of about a second and display seemingly random colors.
Does anyone know what's wrong?
My code:
#include <FastLED.h>
#define LED_PIN 7
#define NUM_LEDS 10
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++){
leds[i] = CRGB(0,0,255);
FastLED.show();
delay(100);
}
for (int i = 0; i < NUM_LEDS; i++){
leds[i] = CRGB(255,0,0);
FastLED.show();
delay(100);
}
}
FastLED.show();
anddelay(100);
after thefor
loop