     Serial.print("ms, RPM: ");
     Serial.print(rpm);
     Serial.println();
-  }
+    loopsSinceSerialWrite = 0;
+  }
+
+  loopsSinceSerialWrite++;
 }
 
 // -------------------------

  period = getPeriod();
  rpm = getRPM();

  if (active && ignitionMode == OFF)
    enableCoil();
  else if (!active)
    disableCoil();
    
  if (updateTimer) 
  {
    //Set the delay period (Head of Mode)

  
  float percentage = frequency / 1023.0;
  
  if (debug && loopsSinceSerialWrite >= serialOutLoops)
  {
    Serial.print("Frequency: ");
    Serial.print(frequency);
