Dr_Doggy
Well-Known Member
I have found the tone function for arduino which is able to produce tones like this:
for (int ctr = 0; ctr < 20000; ctr++)
{
int word = recording11[ctr] ;
tone(8, word, 100);
delay(10);
}
where 8 is the pin, word is the frequency, and 100 is the duration length (which is override when calling next tone loop), the speaker is running off HDW pwm, and matches frequency, since i stop hearing it at about 17khz
I have also successfully decoded a uploaded a wav file on arduino, with the lowest possible settings, so bitrate of 8k, mono, 8bit data
but the data that is encoded in 8-bit is made for a DAC, which i dont have,
..... so is there a way i can convert ADC data to PWM? or plan B without extra circuitry?
for (int ctr = 0; ctr < 20000; ctr++)
{
int word = recording11[ctr] ;
tone(8, word, 100);
delay(10);
}
where 8 is the pin, word is the frequency, and 100 is the duration length (which is override when calling next tone loop), the speaker is running off HDW pwm, and matches frequency, since i stop hearing it at about 17khz
I have also successfully decoded a uploaded a wav file on arduino, with the lowest possible settings, so bitrate of 8k, mono, 8bit data
but the data that is encoded in 8-bit is made for a DAC, which i dont have,
..... so is there a way i can convert ADC data to PWM? or plan B without extra circuitry?