This little Arduino library makes it easy to schedule repeating tasks with only a few lines of code.
- Simplifies code
- Does not block the ‘loop’ function
- Runs a defined function(Task) you created at a set interval.
- Tasks can be delayed on start-up. Useful for when your task is dependent on other tasks starting first.
- Set the number of times you want it to run.
- Stop,Start and pause scheduled tasks
- Has some good examples of how to do things.
Below is a simple example of scheduling a task to blink the on-board LED ever 1/2 second.
The task scheduler points to the TaskToPerform function,but can be any function with a ‘void FunctionName()’ signature. Just remember to change the task.check to point to your function if you do change it. Eg. Task1.check(,);
The code library can be downloaded here –> EasyScheduler
To install copy the content of the zip file into your libraries directory of your Arduino IDE installation.