Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

ESP8266_ISR_Timer not working without ISR_Timer.run() on ESP8266 #14

@anand-010

Description

@anand-010

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions