   float rpmL = pwm2rpm(pulseIn(PWM_PIN_L, HIGH));
   float rpmR = pwm2rpm(pulseIn(PWM_PIN_R, HIGH));
 
-  BW.DriveWheels(rpmL, rpmR); 
+  BW.DriveWheels(rpmL, rpmR);
+
+#ifdef SERIAL_DEBUG
+  Serial.print("rpm: ");
+  Serial.print(rpmL);
+  Serial.print(", ");
+  Serial.print(rpmR);
+  Serial.println();
+#endif
+
 }

  pinMode(PWM_PIN_L, INPUT);
  pinMode(PWM_PIN_R, INPUT);

  Serial.begin(57600);
  BW.Init();
}

void loop()

  pwm = constrain(pwm, PWM_L, PWM_H);
  float rpm;

  if(abs(pwm-PWM_M) < PWM_DZ)
    rpm = 0.0;
  else if(pwm < PWM_M)
    rpm = (float)(pwm-PWM_M)/(float)(PWM_M-PWM_L);
  else
    rpm = (float)(pwm-PWM_M)/(float)(PWM_H-PWM_M);
