Skip to content

Commit 0673d8b

Browse files
authored
Update CircuitPlaygroundExpress_AudioSine.py
Closes: adafruit#979, thanks @slott56!
1 parent 211f8eb commit 0673d8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Introducing_CircuitPlaygroundExpress/CircuitPlaygroundExpress_AudioSine.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
length = SAMPLERATE // FREQUENCY
2525
sine_wave = array.array("H", [0] * length)
2626
for i in range(length):
27-
sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
27+
sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15) + 2 ** 15)
2828

2929
# Enable the speaker
3030
speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)

0 commit comments

Comments
 (0)