Hi there,
I have no experience with FastLED.
I am trying to blink with WS2812B (you can see the code below) and when LED is changing color to another color then I don't know why but white color comes out :/ pls take a look at the video.

I am using Arduino MiniPro 16MHz/5V


CODE:
#include "FastLED.h"

#define NUM_LEDS 1
#define DATA_PIN 3

CRGB leds[NUM_LEDS];
unsigned long lastChange = 0;
const long interval = 500;

void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
leds[0] = CRGB::Blue;
FastLED.show();
lastChange = millis();
}

void loop() {
unsigned long currentMillis = millis();
if (currentMillis - lastChange >= interval) {
lastChange = currentMillis;
int barva = random(0, 2);
if (barva == 0){
leds[0] = CRGB::Red;
}
if (barva == 1){
leds[0] = CRGB::Green;
}
if (barva == 2){
leds[0] = CRGB::Blue;
}
FastLED.show();
}
}
Shared publiclyView activity