Hi,I'm trying to use el_supremo's DTMF library. No matter what I do, I can't get a reading/signal from it.I am wiring up the handset output of my telephone with this schematic:Taken from: https://coolarduino.files.wordpress.com/2011/02/dc_bias11.pngI know this circuit is working because other libraries that do different things correctly analyze the audio.

Is there something I need to change? I would prefer not to by a DTMF Decoder.

DTMF.cpp gets compile errors for me. I use the current version of the 'arduino' package from the Fedora 'updates' repository on Fedora 20. Perhaps something has changed in the avr-gcc compiler. I get error message: unable to find a register to spill in class 'POINTER_REGS'The line causing the error is: dtmf_mag = sqrt(Q1*Q1 + Q2*Q2 - coeff*Q1*Q2);I fixed the problem by splitting up this expression into 3 lines: float tmp; tmp = Q1*Q1 + Q2*Q2; tmp = tmp - coeff*Q1*Q2; dtmf_mag = sqrt(tmp);

The library is specifically designed to decode the 8 DTMF tones. Decoding CTCSS tones is much more difficult because in some cases they are less than 3Hz apart whereas the DTMF tones are at least 70Hz apart.If you were aiming to decode only a few of the tones and could choose a few that were much further apart, it can be done, but trying to decode all of them is probably impossible on an Arduino without external hardware.

The code compiles with Arduino version 1.0.6 but it appears that there is a bug of some sort in the compiler in versions 1.6.0 and 1.6.1 - probably related to the -Os flag. I have a workaround. Replace the entire DTMF:detect function in the DTMF.cpp library file with this:

I didn't notice/remember the report of the same problem in message #24 by griff2a until after I'd found a fix. My first attempt at splitting up the statement was similar to his but it didn't help so I had to split it even further.

Let me know if this works for you. I will update the link to the library.