Yep, will do.
do you mean this one: http://www.arduino.cc/playground/Code/PCMAudio? I'm more confused about the hardware needed to get this working? Do I need to just plug in a speaker to two PWM ports?
yes. To feed directly into an 8 ohm speaker/earphone for testing, try something like a 220 ohm resistor from pin 11 to the speaker then from the other side of the speaker to ground.
for more volume run a 10K and a 1K in series between pin 11 and ground. feed the powered speaker input from across the 1K.
I will stick one on my website
That's good to know! I don't think there could ever be enough Arduino resources on the net
For stored audio you probably want to look at this:
What I really want is to be able to play a tone on Arduino based on some sort of input (possibly a touch screen). I would ideally like these tones to be nice sounding / more complex than just a sine wave but I see the sine waves as a starting point. I hope I am being clear?
Thanks
yes. To feed directly into an 8 ohm speaker/earphone for testing, try something like a 220 ohm resistor from pin 11 to the speaker then from the other side of the speaker to ground.
for more volume run a 10K and a 1K in series between pin 11 and ground. feed the powered speaker input from across the 1K.
Sorry didn't see this post, I will give this a try. Thanks for your help! I will post back with my progress.
Right so I've been digging around the web some more and I think it has just confused me even more.
Say I bought this this speaker, how would I then power it with my arduino? Would I need an amplifier?
I have a 6 Ohm, 0.6 W speaker at the moment, is it the same case with this? What exactly do I need to get this speaker (or the one mentioned above) working correctly?
Is it even possible to power a speaker like this with PWM? What about more than 8-bit sound?
Sorry for the barrage of questions! I feel as if I have searched around the web for so long but found nothing I can actually use to help me. I will post here when I get it working with schematics, etc just in case anyone in the future needs the same thing as me.