Hi everyone, I'm using this library for months now but I'm still scraping my

Hi everyone, I’m using this library for months now but I’m still scraping my head trying to understand better a couple of concepts concerning timings and interrupts:

A) I understand the problems calling the show() function when using led strips without a clock pin (as WS2811) and why we need to disable the interrupts, but that shouldn’t be needed with led strips such as APA102 that has a variable clock speed via the 4th pin.
So, is declaring the LED_TYPE enough to have my interrupts enabled again while using this variable clock speed strips? Are there other definitions/functions that could help me having my lovely interrupts back? (I read lots of discussions in the past but I can’t convice myself I understood how it works really)

B) Using lots of serial call and response for my projects to communicate with graphic softwares as Processing and Touchdesigner, what’s the best approach to update my pixel (aka where to put the show() function) without slowing (or blocking, if interrupts are disabled) the serial communication and millis() based timing functions?

Thank you in advance for the support, I really love these strips, but this fact of timing and interrupts makes me crazy during every project, maybe a better understanding of the total and using a better approach while programming, could make me a more productive and surely happy person. Have a nice evening,
Francesco

You are correct that with a clock strip, you can have interrupts on.
Also, with an ESP8266, ESP32, teensy 3, you can most of the time keep interrupts on too, as ISRs tend to run quickly enough that they fit between 2 LED updates.
millis() is going to stop working usefully on any strip without a clock, even with interrupt enabled.
Serial communication is so very very slow that it doesn’t really get impacted in my experience
hope this helps.

@Marc_MERLIN thank you very much, but how can I specify that I want my interrupts enabled? ENABLE_INTERRPUTS maybe? thank you and sorry for the stupid questions but they are driving me to despair :frowning:

@Francesco_Poggi interrupts depend on what chip you’re using. I have not used APA102, but my guess is that FastLED does not need to disable interrupts at all when talking to it, so there would be no command or need to re-enable interrupts either.
An easy way for you to check is to run FastLED.show() 10000 times in a tight loop, take millis() before and after and see whether the value changed by as many seconds as you timed with a stopwatch.
You also didn’t say what chip you’re running on. FastLED behaves very differently depending on the chip.