basic_bot.commons.servo_pca9685
Servo Objects
This class controls a single servo motor using the Adafruit PCA9685 servo controller. It uses a background thread to move the motor to a destination angle at a give fraction of the motor's range and thereby control the speed.
It requires the following Adafruit CircuitPython libraries to be installed:
python -m pip install adafruit-blinka adafruit-circuitpython-pca9685 adafruit-circuitpython-motorkit
__init__
Constructor
current_angle
Returns the current angle of the servo motor
step_delay
Returns the current step delay
step_delay
Sets the step delay
move_to
Move the servo to the specified angle
pause
Pause the servo movement
resume
Resume the servo movement
stop_thread
Stop the servo movement thread
wait_for_motor_stopped
Wait for the motor to stop moving