 //  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) {

   yRange[0] = min(yRange[0], y);
   yRange[1] = max(yRange[1], y);
   
   Serial.print(xRange[0]); Serial.print(", "); Serial.println(xRange[1]);
   Serial.print(yRange[0]); Serial.print(", "); Serial.println(yRange[1]);
 }

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

  float mx, my = 0.0;
  float accel_x = clamp(accel.acceleration.y, -20, 20)

  if (accel.acceleration.x > xRange[1] || accel.acceleration.x < xRange[0]) {
    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 > yRange[1] || accel.acceleration.y < yRange[0]) {
    my = map(accel.acceleration.x - xNormal, -20, 20, 200, -200);
    mx = map(accel.acceleration.y - yNormal, -20, 20, 200, -200);
  }
  Mouse.move(mx, my, 0);

//  print out accelleration data
