Open X-Y opened 9 years ago
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.
@edgarsilva anything that sets voltage to zero will effectively turn the servo "off".
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.
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