Arduino Forum

Using Arduino => Audio => Topic started by: khaled213 on Oct 03, 2018, 03:23 pm

Title: play sound wav files using arduino
Post by: khaled213 on Oct 03, 2018, 03:23 pm
i tried to play sound using arduino but  i didnt know how to  ? so im searching for help  im using arduino nano and the micro sd card adapter module 
this module
https://www.aliexpress.com/item/1pcs-lot-Micro-SD-card-mini-TF-card-reader-module-SPI-interfaces-with-level-converter-chip/32735273502.html?spm=a2g0s.9042311.0.0.27424c4dnfT8bk
Title: Re: play sound wav files using arduino
Post by: Grumpy_Mike on Oct 03, 2018, 04:12 pm
Use this libiary https://github.com/TMRh20/TMRpcm  (https://github.com/TMRh20/TMRpcm)
Title: Re: play sound wav files using arduino
Post by: DVDdoug on Oct 03, 2018, 04:18 pm
The Arduino doesn't have a DAC but the tmrPCM library "fakes it" with PWM.   I've never tried it so that's about all I can tell you.

Or, you can get an audio shield that's got the DAC, a dedicated audio clock, and memory slot and the processing power to handle the audio.    ...Or you could get a Raspberry Pi.
Title: Re: play sound wav files using arduino
Post by: Grumpy_Mike on Oct 07, 2018, 04:22 pm
Quote
The Arduino doesn't have a DAC but the tmrPCM library "fakes it" with PWM.   I've never tried it so that's about all I can tell you.
It uses a similar technique in my code, this is what it sounds like.

https://www.youtube.com/watch?v=WShVFcrFpwU (https://www.youtube.com/watch?v=WShVFcrFpwU)
Title: Re: play sound wav files using arduino
Post by: Muzzy93 on Oct 16, 2018, 07:35 pm
I am using the Robertsonics wave trigger $50, which is the only way I could figure out to do it without a half second of latency. It's pretty user friendly.