You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a RP2040 board programming with Arduino IDE and trying your SimpleTone example.
I get it to work but the volume or as it is called amplitude values are not changing the volume of sound out. If I set it to 0 it mutes the sound and if I set it to any number higher it starts the sound at more or less same volume no matter what value..??
Also I2Swrite seems to write to both L&R even if only called once. Yet sketch say 1 write for Left and 2 writes for L&R.
If I do .........
I2Swrite(sample);
I2Swrite(0);
It writes the sample value to Left and a Zero value to Right.
Also doing only 1 write gives me a octave higher pitch than 2 writes....??? so pitch is dependant on waht else is running in loop
Also the pitch / frequency of sound out depends on the sample rate and not just on the the frequency variable setting.
Wondering is there a solution to this or a workaround etc.
this is link to the sketch.... https://github.com/earlephilhower/arduino-pico/blob/master/libraries/I2S/examples/SimpleTone/SimpleTone.ino
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using a RP2040 board programming with Arduino IDE and trying your SimpleTone example.
I get it to work but the volume or as it is called amplitude values are not changing the volume of sound out. If I set it to 0 it mutes the sound and if I set it to any number higher it starts the sound at more or less same volume no matter what value..??
Also I2Swrite seems to write to both L&R even if only called once. Yet sketch say 1 write for Left and 2 writes for L&R.
If I do .........
I2Swrite(sample);
I2Swrite(0);
It writes the sample value to Left and a Zero value to Right.
Also doing only 1 write gives me a octave higher pitch than 2 writes....??? so pitch is dependant on waht else is running in loop
Also the pitch / frequency of sound out depends on the sample rate and not just on the the frequency variable setting.
Wondering is there a solution to this or a workaround etc.
this is link to the sketch....
https://github.com/earlephilhower/arduino-pico/blob/master/libraries/I2S/examples/SimpleTone/SimpleTone.ino
Beta Was this translation helpful? Give feedback.
All reactions