Fix duty_cycle range.
@@ -11,7 +11,7 @@ piezo = pulseio.PWMOut(board.A2, duty_cycle=0, frequency=440, variable_frequency
while True:
for f in (262, 294, 330, 349, 392, 440, 494, 523):
piezo.frequency = f
- piezo.duty_cycle = 65536 // 2 # On 50%
+ piezo.duty_cycle = 65535 // 2 # On 50%
time.sleep(0.25) # On for 1/4 second
piezo.duty_cycle = 0 # Off
time.sleep(0.05) # Pause between notes
