viam.components.servo.servo
Module Contents
Classes
Servo represents a physical servo. |
- class viam.components.servo.servo.Servo(name: str)[source]
Servo represents a physical servo.
This acts as an abstract base class for any drivers representing specific servo implementations. This cannot be used on its own. If the
__init__()
function is overridden, it must call thesuper().__init__()
function.- SUBTYPE: Final
- abstract async move(angle: int, *, extra: Optional[Mapping[str, Any]] = None, timeout: Optional[float] = None, **kwargs)[source]
Move the servo to the provided angle.
- Parameters:
angle (int) – The desired angle of the servo in degrees.
- abstract async get_position(*, extra: Optional[Mapping[str, Any]] = None, timeout: Optional[float] = None, **kwargs) int [source]
Get the current angle (degrees) of the servo.
- Returns:
The current angle of the servo in degrees.
- Return type:
int