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 ([email protected]). It is updated to work with Arduino IDE 1.8.5.
hi @cygig
While setting up an example for my students I realised that the Arduino library indexer is still pulling the files with the scr folder name.
Could you please update the version number to 0.4.2 in library.properties and then create release 0.4.2?
This will make sure that at the next scraping the working version of your library will be picked up and added to the index.
if you use set() only once in your app setup code, and use enable() \ disable() to control the event functionality, e.g. implementing a one-shot as per -->
callback() { /* do something later.../; disable(); } armcallback() { / do something now..*/.; enable(); }
you will find no delay happening between something now and something later on the first callback. This is inconsistent behaviour.
Suggest modifying enable() to include the line "lastTime = millis();"