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:
28
28
"""DC motor driver. ``positive_pwm`` and ``negative_pwm`` can be swapped if the motor runs in
29
29
the opposite direction from what was expected for "forwards".
30
30
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
32
32
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
34
34
when high and the other is low."""
35
35
36
36
def __init__ (self , positive_pwm , negative_pwm ):
Original file line number Diff line number Diff line change 20
20
class _BaseServo : # pylint: disable-msg=too-few-public-methods
21
21
"""Shared base class that handles pulse output based on a value between 0 and 1.0
22
22
23
- :param ~pulseio .PWMOut pwm_out: PWM output object.
23
+ :param ~pwmio .PWMOut pwm_out: PWM output object.
24
24
:param int min_pulse: The minimum pulse length of the servo in microseconds.
25
25
:param int max_pulse: The maximum pulse length of the servo in microseconds."""
26
26
@@ -58,7 +58,7 @@ def fraction(self, value):
58
58
class Servo (_BaseServo ):
59
59
"""Control the position of a servo.
60
60
61
- :param ~pulseio .PWMOut pwm_out: PWM output object.
61
+ :param ~pwmio .PWMOut pwm_out: PWM output object.
62
62
:param int actuation_range: The physical range of motion of the servo in degrees, \
63
63
for the given ``min_pulse`` and ``max_pulse`` values.
64
64
:param int min_pulse: The minimum pulse width of the servo in microseconds.
Original file line number Diff line number Diff line change 3
3
4
4
import time
5
5
import board
6
- import pulseio
6
+ import pwmio
7
7
from adafruit_motor import servo
8
8
9
9
# 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 )
11
11
12
12
# To get the full range of the servo you will likely need to adjust the min_pulse and max_pulse to
13
13
# match the stall points of the servo.
You can’t perform that action at this time.
0 commit comments