I see the Melody tutorial that show how to play a tone of specified frequency through a Piezo, but what about if I need to play dual tones simultaneously.....like DTMF tones. Is that going to be possible with a Piezo? As a newbie there is much I don't understand, but it seems like since the Piezo is connected to a single pin I don't see how I can generate a tone that includes two frequencies.
I'm pretty sure you'd need 2 piezos running at the same time to generate a dual tone. :-/
The latest version of the Tone library supports generating DTMF on board and there is an example sketch showing how:
http://code.google.com/p/arduino-tone/source/browse/trunk/examples/DTMFTest/DTMFTest.pde
However, I don't think a Piezo is the best choice for DTMF as piezos tend to be pretty peaky in their frequency response. You would probably be better off using a very small dynamic speaker (with a series current limiting resistor), say like this on:
http://www.allelectronics.com/make-a-store/item/SK-230/20-MM-32-OHM-SPEAKER/-/1.html
Lefty
The latest version of the Tone library supports generating DTMF on board and there is an example sketch showing how:
Wow! And here I was thinking that DTMF required two piezos/speakers ::)..
Wow! And here I was thinking that DTMF required two piezos/speakers
Oh course not, otherwise we would all have to be wearing stereo headphone for your telephone conversations.
Lefty
Fair point :P. I guess I never gave it much thought?
Thanks so much for the quick and helpful answer!