Tachometer code

Hi All I need to change over an analog frequency from a magnetic sensor to a PWM to drive an analog meter. I am smart enough to change around the language to make it work if nessasary. just not smart enough to write the language. my input frequency is from 0 to 2300 HZ output to the gauge is 250 UA has someone all ready written a similar code that is posted somewhere. I have done a little searching but have not found anything close.can someone steer me in the right direction.

Thanks Doug

Analog frequency in what voltage range?

If the voltage range is 0 to +5V, you could plug into a digital pin, and use pulseIn to measure the time it takes to go from LOW to HIGH and back to LOW. The inverse of that time is the frequency.

Hi the voltage varies from 0 up 30 AC volts the lower the RPM the lower the voltage. I know the Arduino max input voltage is 5 Volts and I will need to limit the input voltage.I can do that in the circuitry.
The problem is that I am not capable of writing the code start to finish. was hoping to find A similar code that I could adjust to my spec’s I think I can do that.

Thanks Doug