kaiss:
sorry , the input is A0.thanks
Well, that's better. You still need to take a bunch of readings, to find two subsequent peaks so you can measure the frequency.
What is supplying the signal being measured? How long does each signal stay at a given frequency?