Go Down

Topic: [Arduino Due] [Scheduler] How to stopLoop? (Read 722 times) previous topic - next topic

congthanh196

Hi everybody.
I'm using Scheduler.h library in Arduino Due for multitasking(execute many functions at the same time) by using Sheduler.startLoop(func).
I need to stop a loop when i call Sheduler.stopLoop(func) but there is not Sheduler.stopLoop(func) in Scheduler.h.
How can i modify Scheduler.h library for my purpose?
Thanks.

UKHeliBob

Can you not have the function called by startLoop() check a variable and return immediately if it set to true/false/whatever ?  Set the variable to the appropriate value to stop the function running.

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up