Brand new Hardware Timer Interrupt library for ESP8266
From README.md
## More useful Information
The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega.
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available. The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short. Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
The timer1 counters can be configured to support automatic reload.
As I’ve seen many people struggling with
- using
blocking
calls or not - where and how to use them
I plan to implement next project to add more examples to show how to integrate there hardware timer interrupts into so-called mission-critical
projects using Blynk as only GUI
.
I’m also thinking about using some kind of preemptive RTOS (possibly FreeRTOS) to integrate with Blynk.
Any suggestion is welcome.
Regards,
Edited: Nov 25th 2019
New release v1.0.1
- Fix compatibility issue causing compiler error while using
pre-1.8.10-Arduino-IDEs
and/orpre-2.6.0-ESP8266-cores
. - Add examples to integrate with Blynk, where ISR + Hardware Timer Interrupt are used to process input / output. This way important tasks can avoid being blocked by connecting tasks.