How to detect frequency

hey,
I wanna write a program that it read the frequency of the analog input .If the Arduino can read analog signal ,so how it knows the frequency?
I need your help to start my project (vocal command ).
thank you

If the Arduino can read analog signal ,so how it knows the frequency?

It needs to find the high value from a series of readings at known times, and it needs to find the low value from that series of readings. Given those two values, and when they occurred, you can calculate the frequency.

I need your help to start my project (vocal command ).

If you think that you are going to make the Arduino recognize voice commands, you are sadly mistaken.

Your title is about as useful as trying to find one grain of sand on a beach.

How about modifying it to something that will help people to help you - such as How to detect frequency

...R

It needs to find the high value from a series of readings at known times, and it needs to find the low value from that series of readings

The high value from a series of readings can only give me the amplitude of the signal,but I need to find the period to calculate the frequency.

Don't you suppose that the time between two highs would define the period?

In fact,
Frequency= 1/ T, where T is the time between two peaks.

that's a good idea , thank you for your help.

Take a look at this:

JohnLincoln:
You might find it better to use a digital input, rather than an analogue input.
It is far easier to detect a digital input changing state, than searching through an analogue waveform looking for maxima and minima.
You might need to amplify your signal, and then limit its amplitude with a zener diode to give you correct logic levels.

Yes, with digital pins and zero-crossing detection should be easy.

Yes, with digital pins and zero-crossing detection should be easy.

Maybe so, but how does that help with OP's stated goal of voice recognition?

As to that:

About 1 minute in.