 }
 
 void showRPM() {
-  debug_motor_rpm = true;
+  xv_config.show_rpm = true;
   if (xv_config.raw_data == true) {
     hideRaw();
   }
-  Serial.println("Showing RPM data");
+  Serial.println(F(" "));
+  Serial.print(F("Showing RPM data"));
+  Serial.println(F(" "));
 }
 
 void hideRPM() {
-  debug_motor_rpm = false;
-  Serial.println("Hiding RPM data");
+  xv_config.show_rpm = false;
+  Serial.println(F(" "));
+  Serial.print(F("Hiding RPM data"));
+  Serial.println(F(" "));
 }
 
 void showDist() {
-  debug_dist = true;
+  xv_config.show_dist = true;
   if (xv_config.raw_data == true) {
     hideRaw();
   }
-  Serial.println("Showing Distance data");
+  Serial.println(F(" "));
+  Serial.print(F("Showing Distance data"));
+  Serial.println(F(" "));
 }
 
 void hideDist() {
-  debug_dist = false;
-  Serial.println("Hiding Distance data");
+  xv_config.show_dist = false;
+  Serial.println(F(" "));
+  Serial.print(F("Hiding Distance data"));
+  Serial.println(F(" "));
 }
 
 void showAngle() {


  boolean motor_enable;  // to spin the laser or not.  No data when not spinning
  boolean raw_data;  // to retransmit the seiral data to the USB port
} 
xv_config;

const byte EEPROM_ID = 0x03;  // used to validate EEPROM initialized

double pwm_val;
double pwm_last;
double motor_rpm;

boolean debug_motor_rpm = false;  // controlled by ShowRPM and HideRPM commands
boolean debug_dist = false;  //  controlled by ShowDist and HideDist commands
int debug_angle = 360;  // controlled by ShowAngle (0 - 359, 360 shows all)

PID rpmPID(&motor_rpm, &pwm_val, &xv_config.rpm_setpoint, xv_config.Kp, xv_config.Ki, xv_config.Kd, DIRECT);


}

void initEEPROM() {
  xv_config.id = 0x04;
  strcpy(xv_config.version, "1.2.1");
  xv_config.motor_pwm_pin = 9;  // pin connected N-Channel Mosfet

  xv_config.rpm_setpoint = 300;  // desired RPM
