-
Notifications
You must be signed in to change notification settings - Fork 265
add a servo.stop()
function
#127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@macMikey to have full stop control, you could connect the 5V pin to a digital pin and set it to high. Whenever you want to stop the servo you could just set that pin low and it would cut power to the servo. |
A couple of remarks:
|
i'm pretty sure i tried to detach the servo, but that didn't solve the problem. it seems that once the servo receives the instruction, it's moving to the instructed position, no matter what. |
@macMikey wrote:
This is pretty weird. What Arduino are you using? What type of servo? The file Servo.h says, about |
it may be that the controller is just not fast enough.this issue is with one of the hackpacks, specifically the ir turret. when the unit powers on, it attempts to crash-home the pitch servo. unfortunately, the turret's center of mass is far enough away from the magnetic mount that it can detach from the base, either at the start, or at the end of the move. |
I have looked at this before with my turret, and it looks like the problem is when you use |
think of this as something akin to an e-stop.
i have run into a situation, with the crunchlabs iturret. at power on, the turret attempts to pitch home. unfortunately, the force of that move can cause the turret to "spike" the magazine (because we don't know the power-on position of the servo, and we can't read it, either).
there are two ways to solve that problem (using this library):
servo.stop()
. this command would act like an e-stop, cutting the signal to the servo, regardless of the.write()
it is currently executing.i suppose my code for homing the servo would then look something like this:
in this way, the move to 90 would be broken into five moves (depending on the starting position), reducing the change in angular momentum, and still not requiring us to know the position of the servo.
The text was updated successfully, but these errors were encountered: