   pinMode(PWM_PIN_L, INPUT);
   pinMode(PWM_PIN_R, INPUT);
 
-  Serial.begin(57600);
   BW.Init();
+
+#ifdef SERIAL_DEBUG
+  Serial.begin(115200);
+#endif  
 }
 
 void loop()

#include "include/BrushlessWheels.h"

#define MAX_RPM 100
#define PWM_PIN_L 6
#define PWM_PIN_R 7
#define PWM_L 1000
#define PWM_M 1500
#define PWM_H 2000

BrushlessWheels BW;


  float rpmL = pwm2rpm(pulseIn(PWM_PIN_L, HIGH));
  float rpmR = pwm2rpm(pulseIn(PWM_PIN_R, HIGH));

  BW.DriveWheels(rpmL, rpmR);

#ifdef SERIAL_DEBUG
  Serial.print("rpm: ");
  Serial.print(rpmL);
  Serial.print(", ");
  Serial.print(rpmR);
  Serial.println();
#endif

}
