Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By KurtB
#13997 Hi,
additional question. Is it possible to have multiple timers?
I observed that setting the timer twice for different functions they influence each other. Which seems ok, because there is no number or pointer to specify the timer to use.
I.E. one timer to check if IP is vailable, lets say every 10 seconds. Another timer to deal with lets say gpio input without interrupts.
Thanks again
KurtB
User avatar
By gerardwr
#14021
KurtB wrote:Hi,
additional question. Is it possible to have multiple timers?


IGGR has reported that the number of tickers is unlimited (consumes 24 bytes per ticker).
User avatar
By KurtB
#14083 Hi,
sorry, was my fault - I'm not an C++ expert.
Solution: you can define unlimited number of timers, because you create as you like a new instance of Ticker. Each has its own parameters.
Influencing of timers was a problem in my coding.
Problem is solved now.
Many thanks for helping me.
KurtB