Hi,
I was wondering how to play sound files on Arduino...how do I code it and do I need a decoder; If I need a decoder what one do you reccomend?
Hi,
I was wondering how to play sound files on Arduino...how do I code it and do I need a decoder; If I need a decoder what one do you reccomend?
What kind of sound?
[u]tone()[/u] can make basic square waves into a piezo transducer.
If you want to play WAV or MP3 files, look for an audio shield. The audio shield has a digital-to-audio converter, memory for the audio files, and optionally an MP3 decoder, etc.
Some audio shields can drive headphones but In most cases, you'll need an amplifier to drive a speaker.
What audio shield do you reccomend and how do you code them?
You haven't said what it is that you want to play yet.
The shield/module will depend on what you want to do and the code will depend on the shield/module chosen.
Steve
I would like to play .wav and .mp3 files. What shield do I need to play those files? How do I program the shield needed?
the Adafruit Audio FX Sound Board could be an option. you load sounds onto it with a usb. you just digitalWrite (xxx, HIGH); to a pin on the sound board to trigger those sounds.