 int leftEncoderTwo = 9;
 long currentTicks = 0;
 
-//unsigned long leftPololuCount = 0;
-//unsigned long rightPololuCount = 0;
-
-//int encoderLeftCount;
-//int encoderRightCount;
+
 
 double setMotor;
 
-//static long last_count_left = 0;
-//static long last_count_right = 0;
+
 
 void setup()
 {


      float leftcm = noOfCmPerTick * leftTime;
      float rightcm = noOfCmPerTick * rightTime;
      /*float distanceToTravel = (leftcm + rightcm)/2;
      deltaHeading =  (leftcm-rightcm) / 17.2 + deltaHeading;
      deltaX = distanceToTravel * cos(deltaHeading) + deltaX;
      deltaY = distanceToTravel * sin(deltaHeading) + deltaY;*/
      leftTime = leftTime / (timez);
      leftTime = leftTime * 1000;
      rightTime = rightTime / (timez);
      rightTime = rightTime * 1000;
      //InputMid = deltaX * 10000;

      InputLeft = leftTime;
      InputRight = rightTime;

      //midPID.Compute();
      
      //OutputMid
      //SetpointRight = 2000 + map(OutputMid,-1000,1000,-2000,1400);
      rightPID.Compute();
      leftPID.Compute();
      previousLeftTick = leftPololuCount;

  
  Serial.begin(9600);  // sets the serial port to 9600
  timing = millis();
  myServo.attach(A4);
}

// Uses specified distance(cm) to calculate the distance
