Skip to content

provide a way to turn off a Servo #17

Closed
@dhalbert

Description

@dhalbert

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions