When to use a cooperative task manager library?

There are several cooperative task managers listed in the official library list.
As far as I can tell, typically you pass a function pointer and a repeat time interval to the task manager. The task manager then periodically checks to see if any of the functions should be run.

Under what circumstances would you choose to use this method instead of using the basic "blink without delay" method?

Which Arduino board are you using ?

Uno & Mega.

When deciding whether to use a library to manage this you need to bear in mind the amount of memory needed

If you want to use multitasking you would be better off using an ESP32 which has freeRTOS as standard, 2 cores and bags of memory

There you should use Task Macros instead for concurrently executing tasks.

When using a ESP32 its best just to use the built in OS, freeRTOS. With an ESP32 freeRTOS is always running.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.