Skip to content
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

No equivalent of Servo.detach() #11

Open
X-Y opened this issue Mar 4, 2015 · 3 comments
Open

No equivalent of Servo.detach() #11

X-Y opened this issue Mar 4, 2015 · 3 comments

Comments

@X-Y
Copy link

X-Y commented Mar 4, 2015

To stop a continuous rotation servo, one can write 90 to it. However if the servo is of bad quality, it can be difficult to stop entirely. To fix this one can stop sending PWM pulses to the servo. In Arduino lingo it's done by calling Servo.detach(). But in Cylon there doesn't seem to be a way of stopping PWM.

As seen in https://github.com/hybridgroup/cylon-intel-iot/blob/dd72842ff24a3b5a7d68b13ed907ddbac35e4d3a/lib/adaptor.js, function servoWrite and pwmWrite

@X-Y X-Y changed the title No equivalent to Servo.detach() No equivalent of Servo.detach() Mar 4, 2015
@edgarsilva
Copy link
Contributor

We'll take a look into it. Will this be the equivalent to just send 0 to the pwmWrite? or do we actually need to change the mode of the pin to not be pwm pin anymore? like switching back to digital pin.

@deadprogram
Copy link
Member

@edgarsilva anything that sets voltage to zero will effectively turn the servo "off".

@edgarsilva
Copy link
Contributor

mmm... if I change the duty cycle of a connected servo to 0 it would probably fry it no? since it is gonna try to go as far as possible on that direction, same if I apply 1. I kind of remember that is how I burned a couple of mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants