Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266 WiFi delays Timer #2

Open
Gorkde opened this issue Jul 18, 2016 · 2 comments
Open

ESP8266 WiFi delays Timer #2

Gorkde opened this issue Jul 18, 2016 · 2 comments

Comments

@Gorkde
Copy link

Gorkde commented Jul 18, 2016

The establising of WiFi on the ESP takes some time and the timer is delayed and fires multiple times after that.

This causes my Timer I use for pushing data to a server to flood the server.

Is there any way to make it just fire once after beeing delayed?

See: esp8266/Arduino#2295

@SteveToulouse
Copy link

SteveToulouse commented Jul 18, 2016

This could maybe made an option on each timer so that the way simpletimers work already isn't lost (I can see how current mode of operation could be desirable in many cases).

EDIT as discussed in the esp8266 issue, you could put a call to restartTimer in the timer callback function to achieve the desired operation. Maybe a note in this library's doc to explain what happens when calls to simpletimer::run are seperated by more than twice the requested interval?

@Gorkde
Copy link
Author

Gorkde commented Jul 19, 2016

I probably will write my own timer. But this should at least be mentioned I think.

The best way would be to add an option to the timer library to select behavior of the timers (execute once or all occurences).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants