[TriEmbed] ESP8266 Programming tip

John Vaughters jvaughters04 at yahoo.com
Tue Jan 26 09:03:39 CST 2021


In my playing around with the ESP-12e's that I have, I found something that may save someone some time. Using the Ticker library to schedule a task, I quickly found out that the task better be quick or it will crash the program. To define quick, my task was maybe 25ms, which was enough to crash the program. To get around this I found on the web a quick tip that made alot of sense. Just use the Ticker task to flip a bool and then have an if statement run the task and reset the bool. 

It's not what I consider a great programming technique, but I consider it a valid workaround on the limitation. And it still beats running the task on every loop cycle.

I am certainly open to other suggestions, but it works quite well and I will be sticking with it for now.

John Vaughters




More information about the TriEmbed mailing list