Arduino Forum

Using Arduino => Project Guidance => Topic started by: SuperveS on Jan 20, 2013, 08:11 pm

Title: Find analogIn frequency using FFT library
Post by: SuperveS on Jan 20, 2013, 08:11 pm
hi All

i have my android phone sending 4 different frequencies to the Arduino analog in using the earphones jack.
i need my arduino to find out which frequency is coming in, and do some actions according to the certain frequency.

my question is, how can i extract the input frequency and save it as an integer , (or at least a range ?)

i have downloaded the FFT lib and using fix_fft ()

also went through this discussion but still couldnt figure it out...
http://arduino.cc/forum/index.php/topic,38153.0.html

Thanks !
Title: Re: Find analogIn frequency using FFT library
Post by: KeithRB on Jan 20, 2013, 09:58 pm
It might be best to change them to square waves and measure the period.
Title: Re: Find analogIn frequency using FFT library
Post by: robtillaart on Jan 21, 2013, 09:54 pm
square waves +1

what are the 4 frequencies ?
how many pulses can the Arduino expect in one burst?

solution direction: pulseIn() might work or an interrupt based time-measurement if the waves are squared