Go Down

Topic: Play .wav file from SDcard (ethernet shield) on UNO (Read 4010 times) previous topic - next topic

djtsmith007

I have searched and cant seem to get what i need.

I have a SD card on the ethernet shield with 4 wav files, each one says a number (1,2,3,4)

Based on input i want one or multiple wavs played back.

Will SD.read() work?

Thanks

innersky

I think you need a DAC to playback sounds. More info here : http://www.sparkfun.com/tutorials/160

Tuttut

Hi, as long as you only want to playback one file at a time, my SimpleSDAudio library will do the job without an additional DAC. The library also contains an example where you can select the audio file via a web-interface using the Ethernet-Shield. But for this library you need to convert the .WAV-files to a different format before putting them onto SD card.

You can try to change the library that it supports playback of multiple files at a time, but the slow SPI to SD card (also used for Ethernet shield...) is the limiting bottleneck. In lower quality it could be possible to play 2 or 3 files at the same time.

djtsmith007


Hi, as long as you only want to playback one file at a time, my SimpleSDAudio library will do the job without an additional DAC. The library also contains an example where you can select the audio file via a web-interface using the Ethernet-Shield. But for this library you need to convert the .WAV-files to a different format before putting them onto SD card.

You can try to change the library that it supports playback of multiple files at a time, but the slow SPI to SD card (also used for Ethernet shield...) is the limiting bottleneck. In lower quality it could be possible to play 2 or 3 files at the same time.


Yeah ive been using that program. Seems weird because 2-3 files will never play, it causes some loop/freeze thing and the Arduino has to be reset.


Tuttut

Are you sure that all your files on card are completely non-fragmented? Try the following: Copy all files from card to PC, format card using a full format (not quick-format), copy the files back from pc to card. also avoid having long file names and directories on card.

djtsmith007


Are you sure that all your files on card are completely non-fragmented? Try the following: Copy all files from card to PC, format card using a full format (not quick-format), copy the files back from pc to card. also avoid having long file names and directories on card.


Yea we figured it out to be the naming convention, file names too long past 4 characters would stall/crash the program.

Go Up