 }
 
 
-void displaySensorDetails(void) {
+void displaySensorDetails(int delayAmt) {
   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);
-}
+  if (DEBUG) {
+    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(delayAmt);
+}

    calibrationCounter++;
    calibrate(accel.acceleration.x, accel.acceleration.y);
  }
  delay(7);
}



      accelMin = -20,
      // Map inputs to this range (pixels)
      outMin   =  50,
      outMax   = -50,
      // How many milliseconds between polling the accelerometer
      delayRate = 7;
      
const boolean DEBUG = true;

int calibrationCounter = 0;

float xRange[] = {0,0};
float yRange[] = {0,0};

const int MOUSE_LEFT_PIN = 10,
          MOUSE_RIGHT_PIN = 6,
          MOUSE_MID_PIN   = 8;
    
uint16_t lasttouched = 0,
         currtouched = 0;
