     delay(del);
   }
 }
-
-/**
-    Finds the calibration constant of the
-    gyro.
-    @param number of calibration samples
-*/
-int zeroGyro(int calibrationSamples) {
-  float zSum = 0;
-  for(int i = 0; i < calibrationSamples; i++) {
-    if(i % 1000 == 0) {
-      blinkLED(500, 1);
-    }
-    imu.readGyro();
-    float z = imu.calcGyro(imu.gz);
-    zSum += z;
-    delay(10);
-  }
-  return zSum / calibrationSamples;
-}

/**********************************************************************
 * Arduino Uno Program - Controls Servos and Reads IMU                *
 * Project: Eclipse Tracking (2017)                                   *
 * Version: 3.0 (5/07/2017)                                           *
 * Max Bowman / Jeremy Seeman / George Moe                            *
 **********************************************************************/
#include <Stepper.h>
#include <Wire.h>
#include <MsTimer2.h>

  pinMode(LED, OUTPUT);

  // Setup hardware
  setupIMU(); // Gyro

  // Calibrate the gyro
  calibratedOffset = zeroGyro(calibrationSamples);
