Skip to content

Commit 864a757

Browse files
committed
PWMOut variable frequency not required, uses only one counter
1 parent 7f93c2a commit 864a757

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_motor/stepper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ class StepperMotor:
7373
def __init__(self, ain1, ain2, bin1, bin2, *, microsteps=16):
7474
self._coil = (ain2, bin1, ain1, bin2)
7575

76-
# set a safe pwm freq for each output
76+
# reject unsafe (low) pwm freq
7777
for i in range(4):
7878
if self._coil[i].frequency < 1500:
79-
self._coil[i].frequency = 2000
79+
raise ValueError("PWMOut: 'frequency' must be at least 1500")
8080

8181
self._current_microstep = 0
8282
if microsteps < 2:

0 commit comments

Comments
 (0)