codice per il contachilometri per bici

teoria:

e dai un occhiata qui:
http://arduino.cc/forum/index.php/topic,64340.0.html