   Wire.endTransmission();
 }
 
+// Calibrates the sensor
 void calibrateMPU(){
   recordGyroData();
   prevX = gyroX;

// INITIALIZE
void setup() {
  Serial.begin(9600);
  // Set up all servos
  throttle.attach(THROTTLE_PIN);
  rotatingFront.attach(FRONT_PIN);


  // Set up MPU
  setupMPU();
  //Serial.write("setupped");
  // Calibrate sensors
  calibrateMPU();
  //Serial.write("calibrated");

  // Write default values to the servos
  throttle.write(pos1);
