Replies: 1 comment
-
You can enable TRACE and watch serial output if there is a jitter in the values sent to the servos.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using
setTargetPositionReachedHandler
to detect when a servo has finished moving and to detach it. This is to stop the servo overheating when left in position for a long time. The code works fine with just one servo, but if there is more than 1 then then reattachment causes a jitter at the start of the movement. I can't really understand why this is happening and would appreciate some help debugging. I've tried building a queue of servos to detached (marked as volatile) and then detaching them from the main loop() instead of from the handler, but same result. I've also tried removing interrupts entirely and using updateAllServos() but still no joy. Any ideas where I'm going wrong?Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions