Bike Speedometer

From time[0] to time[4] there is 4 revolutions not 5.

Also I would suggest a Hall effect switch as a sensor, they should last longer than the reed contact element.