Loading...
Pages: [1]   Go Down
Author Topic: Find analogIn frequency using FFT library  (Read 320 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
 
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 388
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It might be best to change them to square waves and measure the period.
Logged

Netherlands
Offline Offline
Tesla Member
***
Karma: 90
Posts: 9393
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Pages: [1]   Go Up
Print
 
Jump to: