   
   Serial.begin(9600);  // sets the serial port to 9600
   timing = millis();
-  //PID_mid.SetMode(AUTOMATIC);
-  //PID_mid.SetSampleTime(100);
-  //PID_mid.SetOutputLimits(0, 225);
-  //PID_left.SetSampleTime(100);
-  //PID_right.SetSampleTime(100);
-  
-//  dist1 = sensor1.getDistanceCentimeter();
-  //encoder
-//  encoder.init(7,6,8,9);
- 
   myServo.attach(A4);
- //myServo.write(90);
-// delay(500);yy
- //myServo.detach(); 
-  
-  //moveForward(20);
-  /*
-for(int i=0; i<2; i++) {
-  delay(1000);
-moveForward(50);
-resetPololuTicks();
-delay(1000);
-turnRight(90);
-resetPololuTicks();
-delay(1000);
-moveForward(50);
-resetPololuTicks();
-delay(1000);
-turnLeft(90);
-resetPololuTicks();
-delay(1000);
-moveForward(50);
-resetPololuTicks();
-delay(1000);
-turnLeft(180);
-resetPololuTicks();
-}
-*/
-
-
-/*
-for(int i=0; i<10; i++) {
-  moveForward(20);
-  resetPololuTicks();
-  delay(1000);
-  turnLeft(90);
-}
-
-for(int i=0; i<10; i++) {
-  moveForward(20);
-  resetPololuTicks();
-  delay(1000);
-  turnRight(90);
-}
-*/
-//moveForward(200);
-//turnRight(1440);
-//turnRight(180); 
-//delay(5000);
-//turnRight(90);
 }
 
 // Uses specified distance(cm) to calculate the distance

}

float getDistance() {
//  int totalAvgNoOfTicks = (leftWheelTickCount + rightWheelTickCount) / 2;
//  int distanceCoveredInCm = totalAvgNoOfTicks / noOfTicksPerCm;
//  return distanceCoveredInCm;

  long leftPololuCount = abs(PololuWheelEncoders::getCountsM1());                       
  long rightPololuCount = abs(PololuWheelEncoders::getCountsM2());
  float leftcm = ((PI*6)/2249) * leftPololuCount;

      servoTurn(serialData);
    }
  }

  informReadyOnce = false;
}



void resetPololuTicks() {
  PololuWheelEncoders::getCountsAndResetM1();
