Update CircuitPython_I2S_Tone.py
fixed trailing white space issue
This commit is contained in:
parent
b4824003f6
commit
1cddf91478
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ frequency = 440 # Set this to the Hz of the tone you want to generate.
|
|||
length = sample_rate // frequency # One freqency period
|
||||
sine_wave = array.array("H", [0] * length)
|
||||
for i in range(length):
|
||||
sine_wave[i] = int((math.sin(math.pi * 2 * frequency * i / sample_rate) *
|
||||
sine_wave[i] = int((math.sin(math.pi * 2 * frequency * i / sample_rate) *
|
||||
tone_volume + 1) * (2 ** 15 - 1))
|
||||
|
||||
# For Feather M0 Express, ItsyBitsy M0 Express, Metro M0 Express
|
||||
|
|
|
|||
Loading…
Reference in a new issue