I have modified the Goertzel algorithm implementation here:
so that it can be used to detect DTMF tones. The new version, like the original, is not interrupt driven.
It is provided AS IS for you to play with.
There are two sample audio files in the zip which, when the windows audio is turned up full, the sample code detects with no errors.
There is also a circuit diagram of how I connected the audio from the computer’s headphone output to the Arduino’s analog Pin 0. Use at your own risk.
Unzip the attached file into your libraries directory.
UPDATED 2016/12/19. I’ve attached the most recent version of the library to this message. Later messages (#6, #29) had a link to the zip file but those links will die soon - my ISP is withdrawing the webspace service.
Also, see message #42 for a link to another DTMF library. I haven’t tried it but it is probably better than this one.
DTMF.zip (43.3 KB)