TimerEvent provides an easy way to trigger functions every set time and is a non-blocking alternative to delay() function. TimerEvent is based on TimedAction 1.6 by Alexander Brevig (alexanderbrevig@gmail.com). It is updated to work with Arduino IDE 1.8.5.
Used to setup the timer. Use this within setup(). myPeriod is the interval in milliseconds that the function myFunction will repeat. For example: myTimer.set(1000, myFunction);
Similar to the one above, myTimer is the starting time in unsigned long, which will otherwise be 0 if not declared.
Resets the timer.
Disables the timer.
Enable the timer.
update() goes inside loop(), which does the checks every clock cycle.
Used to change the interval after you had set it.