Timing library
Note: Inside the loop(), use the Timing library as a replacement for delay() which is a blocking function.
The Timing library is a non-blocking library which lets you run several tasks in parallel and control their durations. It is ideal for multitasking applications.
A HITI Timer lets you control the duration of a task and trigger events accordingly.
To use HITI Timers (included in the Base library) :
#include <HITIComm.h>
A HITI MultiTimer allows you to control several consecutive delayed tasks.
To use HITI MultiTimers :
#include <HC_MultiTimer.h>