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
unsigned long lastChange = 0;
const long interval = 500;
i don’t see the issue and can’t test the code but what i saw is the fact that the white comes every second assignement. It’s like every second time its running out of range and showing white… but this is just my observation… could also be missleading
try once FastLED.addLeds<WS2812,DATA_PIN>(leds, NUM_LEDS)
I have tested your update, but nothing has changed.
As you correctly observed, LED turns to white color any time when I want to change to another color. So when the led is green and has to change color to red ( or any other color) there is some intermediate step over white.
hi @Roman_MrAntonka_Fojt ,
I ran your code on my ws2812bs without seeing any flashing white during colour changes. The only thing i changed was the setup to match my rig.
check wiring and soldering (’+ tie LED & IC’s grounds together)
slip in a fastled.clear() call before swapping colours
make sure you have the right colour order in the setup (there’s a sketch in the example folder of the Fastled distribution to establish that)
put a cap across the LEDs’ pos and neg, + a smallish resistor on the data line. Costs (next-to) nothing, does no harm and might help (see: neopixel uberguide - best practises)
If all fails, you could also try using a different LED or a different pin on your Arduino (you never know, either could somehow be dodgy). If it still doesn’t work then I’m out of ideas because I’m also just dabbling.
the random function’s upper bound is exclusive. As it is in your code, the blue will never be called.
@Severin_N Yes I am using the same power supply for both devices.
and i have tryed your update but there is no change - I have tried a lot of different code from the internet but nothing works well. -> HW/wiring problem
Thanks… So it did change it behaviour but still you have the white in between… This is amazing… Sorry i don’t have any explonation for that behaviour… (But im new to that electrical stuff also do there are more experienced guys than me )