ESP8266_ISR_Timer not working without ISR_Timer.run() on ESP8266
anand-010 opened this issue · 1 comments
I want to add some timer interrupts to my existing project.
I want to interrupt on every 10 seconds.
I am selected ESP8266_ISR_Timer
#include <ESP8266_ISR_Timer.h>
ESP8266_ISR_Timer ISR_Timer;
. . . .
void loop()
{
ISR_Timer.run();
if(some condition sets true) {
timerId = ISR_Timer.setInterval(10000L, doingSomething10s);
set condition to false;
}
}
When i remove the ISR_Timer.run(); the timer not working.
But it works with .run() on loop
On the documentation I saw "// You don't need to and never call ISR_Timer.run() here in the loop(). It's already handled by ISR timer."
While using .run() my project getting broken sometimes.
How do i solve this problem.
This is TimerInterrupt library. You are posting in this wrong library.
Anyway, you have to go back, use some examples to understand a little bit of how to use the ESP8266TimerInterrupt Library.
void loop()
{
...
ISR_Timer.run();
...
}
The way you're using is completely wrong and I won't waste my time to explain.
TImerInterrupt, ISR require better knowledge to use them correctly.
I'm so sad that people misuse because of treating the library like some fast food
which will create harm than benefit in the long run.