 void mpr_setup() {
   // needed to keep leonardo/micro from starting too fast!
   while (!Serial);
-  Serial.begin(9600);    Serial.println("Adafruit MPR121 Capacitive Touch sensor test"); 
+  if (DEBUG) Serial.begin(9600); Serial.println("Adafruit MPR121 Capacitive Touch sensor test"); 
   
   // Default address is 0x5A, if tied to 3.3V its 0x5B
   // If tied to SDA its 0x5C and if SCL then 0x5D
-  if (!cap.begin(0x5A))  Serial.println("MPR121 not found");
-  else                   Serial.println("MPR121 found!");
+  if (!cap.begin(0x5A))  if (DEBUG) Serial.println("MPR121 not found");
+  else                   if (DEBUG) Serial.println("MPR121 found!");
 }
 
 

}


void displaySensorDetails(void) {
  sensor_t accel, mag, gyro, temp;
  lsm.getSensor(&accel, &mag, &gyro, &temp);

  Serial.println(F("------------------------------------"));
  Serial.print  (F("Sensor:       ")); Serial.println(accel.name);
  Serial.print  (F("Driver Ver:   ")); Serial.println(accel.version);
  Serial.print  (F("Unique ID:    ")); Serial.println(accel.sensor_id);
  Serial.print  (F("Max Value:    ")); Serial.print(accel.max_value); Serial.println(F(" m/s^2"));
  Serial.print  (F("Min Value:    ")); Serial.print(accel.min_value); Serial.println(F(" m/s^2"));
  Serial.print  (F("Resolution:   ")); Serial.print(accel.resolution); Serial.println(F(" m/s^2"));
  Serial.println(F("------------------------------------"));
  Serial.println(F(""));

  delay(500);
}

   
  xNormal = (xRange[0] + xRange[1])/2;
  yNormal = (yRange[0] + yRange[1])/2;
  
  if (DEBUG) {
    Serial.print("X Min: "); Serial.print(xRange[0]); Serial.print(", Max: "); Serial.println(xRange[1]);
    Serial.print("Y Min: "); Serial.print(yRange[0]); Serial.print(", Max: "); Serial.println(yRange[1]);
  }
}


