Skip to content

Commit 9df0164

Browse files
update motor.py and pca9685 example
1 parent 3436e30 commit 9df0164

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

adafruit_motor/motor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: 2017 Scott Shawcroft for Adafruit Industries
1+
# SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries
22
#
33
# SPDX-License-Identifier: MIT
44

@@ -38,9 +38,9 @@ class DCMotor:
3838
threshold, speed-to-throttle linearity, and PWM frequency sensitivity.
3939
4040
Decay mode settings only effect the operational performance of controller chips such
41-
as the DRV8833, DRV8871, and TB6612. Although either decay mode setting is compatible
42-
with discrete h-bridge controller circuitry such as the L9110H and L293D, operational
43-
performance will not be altered.
41+
as the DRV8833, DRV8871, and TB6612. Either decay mode setting is compatible
42+
with discrete h-bridge controller circuitry such as the L9110H and L293D; operational
43+
performance is not altered.
4444
4545
:param ~pwmio.PWMOut positive_pwm: The motor input that causes the motor to spin forwards
4646
when high and the other is low.

examples/motor_pca9685_dc_motor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
# See here for more info: https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/faq#faq-13
3333
pca.channels[7].duty_cycle = 0xFFFF
3434
motor4 = motor.DCMotor(pca.channels[5], pca.channels[6])
35+
motor4.decay_mode = motor.SLOW_DECAY # Set motor to active braking mode to improve performance
3536

3637
print("Forwards slow")
3738
motor4.throttle = 0.5

0 commit comments

Comments
 (0)