btidey wrote:If you are using the software interrupt (attachinterrupt) for a GPIO then those can suffer fairly variable latencies, particularly when wifi activity is occurring.
You may do better to use a direct timer interrupt mechanism (e.g timer1) to reduce any flicker effects due to latency in responding.
Timer1 of Arduino IDE in ESP8266 is unreliable at its best. If you google around, micros() and millis() are beset with restrictions and crashes.
The guy here uses 120Hz which is 8333usec. The millis() are not good on this and the Wifi() gets affected as well.