Arduino audio frequency reader I have a simple project for my arduino : light some leds when i send a certain frequency from my smartphone through the jack output . For example ,
 I play a simple audio file generated with a frequency generator (it generates sinwaves, sawtooth, quadrate waves...) at 1kHz --> a red led turns on
I play another frequency (5kHz) --> a green led turns on.
I read similar questions , but they needed a precise reading of the signal frequency, so they had to convert from AC to DC and from 700mV to 2,5V, is it necessary in my case ? I can also prepare a track with a program called audacity with the current remaining always positive but oscillating between 0 and 0,7 mV.
How can i realize my project in the simplest way possible ?

Thank you
If you can properly bias your signal, say with a cap and a pot, you
could read it with a digital input. You can then time the rising edges
with micros(), either by polling the pin or using an interrupt. You
could achieve greater accuracy by using the “input capture” feature of a
16-bit timer, if you are using an AVR-based Arduino and are not afraid
of getting your hands dirty with low-level programming.

You need to get the right voltage range for this to work though. On an
Arduino Uno, for example, the thresholds for the input switching from
HIGH to LOW and back are typically around 2.1 and 2.6&nbsp;V
respectively, so you must make sure that your signal amply covers this
range. If you can get 1&nbsp;V peak to peak, that should be enough, and
you can then use the pot to tune the offset.