File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- # SPDX-FileCopyrightText: 2017 Scott Shawcroft for Adafruit Industries
1
+ # SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries
2
2
#
3
3
# SPDX-License-Identifier: MIT
4
4
@@ -38,9 +38,9 @@ class DCMotor:
38
38
threshold, speed-to-throttle linearity, and PWM frequency sensitivity.
39
39
40
40
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.
44
44
45
45
:param ~pwmio.PWMOut positive_pwm: The motor input that causes the motor to spin forwards
46
46
when high and the other is low.
Original file line number Diff line number Diff line change 32
32
# See here for more info: https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/faq#faq-13
33
33
pca .channels [7 ].duty_cycle = 0xFFFF
34
34
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
35
36
36
37
print ("Forwards slow" )
37
38
motor4 .throttle = 0.5
You can’t perform that action at this time.
0 commit comments