Measurement of speed and revolutions