Play WAV. through Arduino Due

Hello everyone!

On my project the planning is to play an WAV. sound file, using a 4 Watt speaker. I'm using the Arduino Due for this project.
There is no ethernet shield on my Arduino.

The problem is that I can't get it to work!

I tried the Arduino example under, Reference->Audio->Begin(), but I can't assign the speaker to a pin.
Can anyone help me please with a working code?

Thanks!!
Luc

Where are you getting the WAV data from?
It is normal to have this on an SD pin.
What have you tried that does not work, please post the code using the # box above the smiles.

The WAV. data is from a final cut pro audio file.
And we actualy do play it from an SD card.
We just tried the audio example for Arduino, the only thing is that we don't understand how to assing a pin to a speaker using that code.

This is the example file from Arduino we are using.
I hope you can help us!

Luc

sketch_sep13a.ino (1.27 KB)

You don't assign a pin you can only use the A/D outputs of the chip, it is a fixed pin.

I tried the Arduino example under, Reference->Audio->Begin(), but I can't assign the speaker to a pin.

Well if you read the Reference->Libraries->Audio page you'd have seen this as the
third line:

The Due uses the DAC0 and DAC1 pins to play sounds.

Hope I am not to late to the game here.

Don't hook up your speakers directly to the Due, It will hurt it.

I haven't' found the official spec for this but the DAC can only handle about 3ma. So your speakers would have to have a resistance of like 1100ohms (most are 4 to 16) to be safe.
You have to run the signal through an amp of some type. For a really simple example see: http://arduino.cc/en/Tutorial/SimpleAudioPlayer