Flickering first LED with FastLED on WS2812b

I have WS2812b LED strips connected to a Wemos D1 Mini with data pin on LED_PIN 13 (D7). I have a 20amp 5v supply with common ground between the D1 and my LED strips. Power is being injected every ~7 LEDs. There are 292 LEDs total.

I have a 100nf capacitor on the strip right next to the first LED (I have also tried a few other capacitors, like 100uf and other sizes). I am using a 74AHCT125 level shifter.

I am still getting persistently flashing/flickering on the first LED off the strip, especially if I'm running any "moving lights" type of code. If I just send a "always on" type of signal it still seems to flash, but also isn't the correct color.

Here is my code. Code Sorry it's so messy, I've just been trying a bunch of things.

Is there something else I can try? I feel like it's a hardware issue, but I can't figure it out because I've done all the things I've seen in other posts (like capacitors and power, etc). But maybe it's my poor code?

I have been experiencing similar, it seems it is a known issue with the esp8266 and FastLED but I have not found a solution. I think it is a timing issue, especially if the esp8266 is doing something else as well (e.g. wifi).
I have just switched to using an esp32 myself.

I'm using APA102 instead of WS2812b LED strips because they don't put the same pressure on the timing... but they are more expensive.

I anyway suggest you switch libraries to neopixelbus and use DMA mode, which is compatible with an ESP that also uses WiFi. The only limitation is the data signal pin (you could also use UARTR mode btw) Using a bit-banged signal will not get you a stable wifi connection.

So I had an esp32 laying around. And yeah, it does not flicker at all using that instead with the same hardware setup.

However, the esp32 seems to not work well with MQTT/pubsubclient. It is very slow anytime I publish a command to the mqtt network. When using the D1 mini, I would sent a message and the controller would immediately respond and update based on the signal. The esp32 takes 15-50 seconds before it seems to register the MQTT message and update. Any chance you ran into something similar?


I have currently the same problem.
First led flickering every 10-15 seconds.

I don’t know why.
Did you find a solution with the wemos d1 mini ?


Update : I solved my problem with neopixelbus library.

1 Like

I am dusting off my Xmas decorations which mostly use WS2811 LED strings. Worked fine last year, but the latest version of ESP boards and updates to the IDE have royally messed up FastLED on the ESP.

If you don't have warnings turn on in preferences, do it now. Well written programs should not generate any warnings.

When compiling last years code, I now get pages of warnings. In researching one of them, keyword 'register' is banned with c++17, I see others saying that the first LED flickers were solved this by going back to Version 2.7.4 of the ESP board

I added this to the top of FastLED.h, and this removed most of the warning. (Not my fix, just something I found online).

#if __cplusplus >= 201703L
#define register // keyword 'register' is banned with c++17

However, there are still dozens of warnings that I haven't solved yet.