jacdac.servo

Submodules

Package Contents

Classes

ServoClient

Servo is a small motor with arm that can be pointing at a specific direction.

class jacdac.servo.ServoClient(bus: jacdac.bus.Bus, role: str, *, missing_actual_angle_value: float | None = None)

Bases: jacdac.bus.SensorClient

Servo is a small motor with arm that can be pointing at a specific direction.
  • Typically a servo angle is between 0° and 180° where 90° is the middle resting position.

  • The min_pulse/max_pulse may be read-only if the servo is permanently affixed to its Jacdac controller.

Implements a client for the Servo service.

property angle: float | None

Specifies the angle of the arm (request)., _: °

property enabled: bool | None

Turn the power to the servo on/off.,

property offset: float | None

Correction applied to the angle to account for the servo arm drift., _: °

property min_angle: float | None

Lowest angle that can be set, typically 0 °., _: °

property min_pulse: int | None

(Optional) The length of pulse corresponding to lowest angle., _: us

property max_angle: float | None

Highest angle that can be set, typically 180°., _: °

property max_pulse: int | None

(Optional) The length of pulse corresponding to highest angle., _: us

property stall_torque: float | None

(Optional) The servo motor will stop rotating when it is trying to move a stall_torque weight at a radial distance of 1.0 cm., _: kg/cm

property response_speed: float | None

(Optional) Time to move 60°., _: s/60°

property actual_angle: float | None

(Optional) The current physical position of the arm, if the device has a way to sense the position., _: °