Check the pulsein() function
http://arduino.cc/en/Reference/PulseIn
It might do the trick depending on voltage level and frequency.
Check the pulsein() function
http://arduino.cc/en/Reference/PulseIn
It might do the trick depending on voltage level and frequency.