moved tone_voolume
@@ -8,8 +8,8 @@ import digitalio
button = digitalio.DigitalInOut(board.A1)
button.switch_to_input(pull=digitalio.Pull.UP)
-length = 8000 // 440
tone_volume = 0.1 # Increase this to increase the volume of the tone.
+length = 8000 // 440
sine_wave = array.array("H", [0] * length)
for i in range(length):
sine_wave[i] = int((1 + math.sin(math.pi * 2 * i / 18)) * tone_volume * (2 ** 15))
