Hi! I'm working on a project based on fastled,

Hi!

I’m working on a project based on fastled, and esp8266 controller (D1 mini) Using a 60 led ws2812b strip. And there are a few things I need some clarification.

The esp8266 doesn’t seems to suffer from Interrupt problem like arduino does. Serial communication works fine, web server able to receive POST requests while handling the LEDS Why is that?
Note that I’m using FastLED.delay(16), instead of simply calling FastLED.show().

How exactly FastLED.delay being handled?
Lets say I call FastLED.delay(16) for 16ms (~60fps).
To my understanding it calls FastLED.show() in a while loop for 16ms.
Does that mean, the entire code waits for 16ms to pass, and then generates the next frame?

If i’m using FastLED.show() only, the serial communication with an arduino is pretty much impossible (as expected). But, If I use FastLED.delay(16) I’m able to squeeze trough a few words on serial. (not the best way, but okay for testing commands) Why is that working?

Because on fast enough systems (like the ESP8266, various arm platforms, etc…) in between writing out each LED FastLED briefly re-enables interrupts, to allow them to run - and if the interrupts don’t take too long to run, it will continue writing out the led data for the frame.

As for how FastLED.delay works - it calls FastLED.show() continuously for however many ms you ask it to.

And as always, if you want to see how something works in the library, we definitely encourage you to browse the source code – there are lots of comments in there, which can sometimes help explain!