Conteggio attivazione di un ingresso digitale

Ciao,
Potrebbe essere questo:
http://arduino.cc/en/Reference/PulseIn

qello che chiedi?

Luca