Skip to content

Commit 42ba480

Browse files
authored
Merge pull request #1131 from kattni/cp-essentials-duty-cycle-fix
Fix duty_cycle range.
2 parents e2afae0 + 2465d20 commit 42ba480

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CircuitPython_Essentials/CircuitPython_PWM_Piezo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
while True:
1212
for f in (262, 294, 330, 349, 392, 440, 494, 523):
1313
piezo.frequency = f
14-
piezo.duty_cycle = 65536 // 2 # On 50%
14+
piezo.duty_cycle = 65535 // 2 # On 50%
1515
time.sleep(0.25) # On for 1/4 second
1616
piezo.duty_cycle = 0 # Off
1717
time.sleep(0.05) # Pause between notes

0 commit comments

Comments
 (0)