File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ class DCMotor:
2828 """DC motor driver. ``positive_pwm`` and ``negative_pwm`` can be swapped if the motor runs in
2929 the opposite direction from what was expected for "forwards".
3030
31- :param ~pulseio .PWMOut positive_pwm: The motor input that causes the motor to spin forwards
31+ :param ~pwmio .PWMOut positive_pwm: The motor input that causes the motor to spin forwards
3232 when high and the other is low.
33- :param ~pulseio .PWMOut negative_pwm: The motor input that causes the motor to spin backwards
33+ :param ~pwmio .PWMOut negative_pwm: The motor input that causes the motor to spin backwards
3434 when high and the other is low."""
3535
3636 def __init__ (self , positive_pwm , negative_pwm ):
Original file line number Diff line number Diff line change 2020class _BaseServo : # pylint: disable-msg=too-few-public-methods
2121 """Shared base class that handles pulse output based on a value between 0 and 1.0
2222
23- :param ~pulseio .PWMOut pwm_out: PWM output object.
23+ :param ~pwmio .PWMOut pwm_out: PWM output object.
2424 :param int min_pulse: The minimum pulse length of the servo in microseconds.
2525 :param int max_pulse: The maximum pulse length of the servo in microseconds."""
2626
@@ -58,7 +58,7 @@ def fraction(self, value):
5858class Servo (_BaseServo ):
5959 """Control the position of a servo.
6060
61- :param ~pulseio .PWMOut pwm_out: PWM output object.
61+ :param ~pwmio .PWMOut pwm_out: PWM output object.
6262 :param int actuation_range: The physical range of motion of the servo in degrees, \
6363 for the given ``min_pulse`` and ``max_pulse`` values.
6464 :param int min_pulse: The minimum pulse width of the servo in microseconds.
Original file line number Diff line number Diff line change 33
44import time
55import board
6- import pulseio
6+ import pwmio
77from adafruit_motor import servo
88
99# create a PWMOut object on the control pin.
10- pwm = pulseio .PWMOut (board .D5 , duty_cycle = 0 , frequency = 50 )
10+ pwm = pwmio .PWMOut (board .D5 , duty_cycle = 0 , frequency = 50 )
1111
1212# To get the full range of the servo you will likely need to adjust the min_pulse and max_pulse to
1313# match the stall points of the servo.
You can’t perform that action at this time.
0 commit comments