 //  Serial.print("  \tZ: "); Serial.print(gyro.gyro.z);     Serial.println("  \tdps");
 //  Serial.print("Temp: "); Serial.print(temp.temperature); Serial.println(" *C");
 
-  delay(16);
+  delay(10);
 }
 
 void calibrate(float x, float y) {

  lsm.getEvent(&accel, &mag, &gyro, &temp);

  float mx, my = 0.0;

  if (accel.acceleration.x > xNormal || accel.acceleration.x > -xNormal) {
    my = map(accel.acceleration.x - xNormal, -20, 20, 200, -200);
    mx = map(accel.acceleration.y - yNormal, -20, 20, 200, -200);
  }
  else if (accel.acceleration.y > yNormal || accel.acceleration.y > -yNormal) {
    my = map(accel.acceleration.x - xNormal, -20, 20, 200, -200);
    mx = map(accel.acceleration.y - yNormal, -20, 20, 200, -200);
  }

  calibrate(accel.acceleration.x, accel.acceleration.y);
  Mouse.move(mx, my, 0);

//  print out accelleration data


  /* Setup the sensor gain and integration time */
  configureSensor();
  
  sensors_event_t accel, mag, gyro, temp;
  lsm.getEvent(&accel, &mag, &gyro, &temp);  
  
  calibrate(accel.acceleration.x, accel.acceleration.y);
}

void loop(void) {
