Using IR sensor and arduino to count RPM

zhomeslice:

   noInterrupts ();

DeltaTime = _deltaTime;
  _deltaTime = 0; // if no pulses occure this allows a speed of zero
  interrupts ();
  SpeedInRPM = Multiplier / DeltaTime; // Calculate the RPM

Don't forget to take the possibility of a zero DeltaTime into account... or you can get a division by zero crash.