Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By gibo77
#81317
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.
User avatar
By RichardS
#81326
gibo77 wrote:If I fail on ESP8266, I might move on to ESP32, which is much expensive. It is sad to see that ESP8266 is only good for Wifi application that closes and open a switch. :shock: :shock:


Trust me I have used them for much more than that! and they have performed 100%

You probably need to approach the issue differently.... not sure how but there are always alternate methods to anything...

RichardS
User avatar
By btidey
#81335
gibo77 wrote:
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.


Could you give some links to unreliability of TImer 1 please? I have used both Timer0 and Timer1 interrupts in several applications without seeing issues. Likewise with micros() as again I have never had crashes caused by that (assuming one obeys watchdog timer rules).