timer callback
Hello, all,
Been searching for a while but I figured I'd ask directly. What are the pros/cons of using rate.sleep() to control loop frequency versus using a timer callback?
From what I have gathered so far, it seems that sleep should be used if you no other processes need to run while waiting for the next control iteration. Using a callback obviously allows the main loop to continue running while we wait for the next callback.
Mainly I'm interested in the reliability of either. I am running a control loop at only 333Hz with very little control code in between callbacks. What happens if the control loop takes longer than the desired period of the iteration?
Please advise. General information or pointers to the proper resources are greatly appreciated.
Thank you!
Alex