get_motor_old
- get_motor_old(channel: int, values: list[int]) MotorOld | NullMotor[source]
Factory function to create and initialize a MotorOld instance.
- Parameters:
channel (int) – The GPIO pin number (12 or 13).
values (list[int]) – [open, close, time_open, time_close, hold], as in get_motor. Shorter legacy values are accepted.
- Returns:
- An initialized MotorOld, or a NullMotor if the
corridor is not used or the PWM pin could not be set up.
- Return type:
MotorOld | NullMotor