Closed
Description
Servo
doesn't have a way of setting the duty cycle to zero, so that the servo becomes unpowered completely. In Arduino land, detach()
does that, because it removes the connection to the (hidden) pwm object (if I understand correctly).
@caternuson was trying to translate the first example here: https://learn.adafruit.com/analog-feedback-servos/servos-as-input-devices and encountered the API differences.
Proposal: add a turn_off()
method, which sets the PWMOut
duty cycle to zero. Setting the .fraction
to any value after that will repower the servo to some non-zero duty cycle.
Tagging @tannewt, @TheKitty, and @ladyada here for any comments they may have.
Metadata
Metadata
Assignees
Labels
No labels