     }
   
     Mouse.move(mx, my, 0);
+  }
   else {
     calibrationCounter++;
-    calibrate(accelX, accelY);
+    calibrate(accel.acceleration.x, accel.acceleration.y);
   }
   delay(7);
 }



void checkTouch() {
  for (uint8_t i=0; i < 12; i++) {
    // it if /is/ touched and /wasn't/ touched before, alert!
    if ( (currtouched & _BV(i)) && !(lasttouched & _BV(i)) ) touchHandler(i);


  configureSensor();
  
  // Set a max and min value to not do anything
  sensors_event_t accel, mag, gyro, temp;
  lsm.getEvent(&accel, &mag, &gyro, &temp);  
}
