ArduinoThread
ArduinoThread copied to clipboard
[Question] setInterval on the fly
Hey there, I am using this library with great success, thank you! I am wondering if there is any way to programmatically change the interval time at which a thread runs at without having to remove the thread, set interval, and then re-add it to the thread controller?
Hello @zytra you just need to use [nameOfYourThreadObject].setInterval(time)
whenever you want in your code, this will change the thread interval without the need to remove and re-add.
Thank you @joaopedrovbs I am going to see if it removes the glitches I am seeing now. Up until now I was clearing the thread controller, adjusting interval and re-adding the threads to the thread controller. thank you