From d7f233578437ef5a7b290ff3685c20a673721dcd Mon Sep 17 00:00:00 2001 From: Dylan Herrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 27 Jan 2021 18:56:46 -0500 Subject: [PATCH 1/3] Moved from pulseio.PWMOut to pwmio.PWMOut --- adafruit_motor/motor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_motor/motor.py b/adafruit_motor/motor.py index 5c83b5c..503baeb 100644 --- a/adafruit_motor/motor.py +++ b/adafruit_motor/motor.py @@ -28,9 +28,9 @@ class DCMotor: """DC motor driver. ``positive_pwm`` and ``negative_pwm`` can be swapped if the motor runs in the opposite direction from what was expected for "forwards". - :param ~pulseio.PWMOut positive_pwm: The motor input that causes the motor to spin forwards + :param ~pwmio.PWMOut positive_pwm: The motor input that causes the motor to spin forwards when high and the other is low. - :param ~pulseio.PWMOut negative_pwm: The motor input that causes the motor to spin backwards + :param ~pwmio.PWMOut negative_pwm: The motor input that causes the motor to spin backwards when high and the other is low.""" def __init__(self, positive_pwm, negative_pwm): From 3d7a86d4457a6cc216edcbb52a672cb275678834 Mon Sep 17 00:00:00 2001 From: Dylan Herrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 27 Jan 2021 18:57:43 -0500 Subject: [PATCH 2/3] Moved servo.py from pulseio.PWMOut to pwmio.PWMOut --- adafruit_motor/servo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_motor/servo.py b/adafruit_motor/servo.py index 7b2d2fa..86e8d80 100644 --- a/adafruit_motor/servo.py +++ b/adafruit_motor/servo.py @@ -20,7 +20,7 @@ class _BaseServo: # pylint: disable-msg=too-few-public-methods """Shared base class that handles pulse output based on a value between 0 and 1.0 - :param ~pulseio.PWMOut pwm_out: PWM output object. + :param ~pwmio.PWMOut pwm_out: PWM output object. :param int min_pulse: The minimum pulse length of the servo in microseconds. :param int max_pulse: The maximum pulse length of the servo in microseconds.""" @@ -58,7 +58,7 @@ def fraction(self, value): class Servo(_BaseServo): """Control the position of a servo. - :param ~pulseio.PWMOut pwm_out: PWM output object. + :param ~pwmio.PWMOut pwm_out: PWM output object. :param int actuation_range: The physical range of motion of the servo in degrees, \ for the given ``min_pulse`` and ``max_pulse`` values. :param int min_pulse: The minimum pulse width of the servo in microseconds. From e342bce8731e12cffe280bf3fb9d8575d3f89452 Mon Sep 17 00:00:00 2001 From: Dylan Herrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 27 Jan 2021 18:58:13 -0500 Subject: [PATCH 3/3] Moved motor_servo_sweep_simpletest.py from pulseio.PWMOut to pwmio.PWMOut --- examples/motor_servo_sweep_simpletest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/motor_servo_sweep_simpletest.py b/examples/motor_servo_sweep_simpletest.py index 2af1224..4cd684c 100644 --- a/examples/motor_servo_sweep_simpletest.py +++ b/examples/motor_servo_sweep_simpletest.py @@ -3,11 +3,11 @@ import time import board -import pulseio +import pwmio from adafruit_motor import servo # create a PWMOut object on the control pin. -pwm = pulseio.PWMOut(board.D5, duty_cycle=0, frequency=50) +pwm = pwmio.PWMOut(board.D5, duty_cycle=0, frequency=50) # To get the full range of the servo you will likely need to adjust the min_pulse and max_pulse to # match the stall points of the servo.