我有代码可以从 arduino 播放一点声音。这首歌是根据数值编码的。但是我怎样才能让它从 arduino 播放得更响亮呢?
#include <PCM.h>
int switchPin = 8;
const unsigned char sample[] PROGMEM = {
140, 124, 130, 126, 129, 126, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 127, 128, 128, 128, 128,
};
void setup()
{
pinMode(switchPin, INPUT);
}
void loop()
{
if(digitalRead(switchPin) == HIGH)
{
startPlayback(sample, sizeof(sample));
}
}