 }
 
 
-int prevServoX = 0, prevServoY = 0;
-
-void moveTurret() {
+void track() {
   if (prevX != x || prevY != y) {
     prevX = x;
     prevY = y;

      if (mySerial.read() == 'Y') {
        y = mySerial.parseInt();

        moveTurret();
      }
    }
    else if(mySerial.read() == 'W'){

    if(servoX <= 25){
      xx = 1;
    }
    else if(servoX >= 45){
      xx = -1;
    }

    if(servoY <= 25){
      yy = 1; 
    }
    else if(servoY >= 45){
      yy = -1; 
    }
    
    SoftwareServo::refresh();
    moveXY(xx, yy);
    SoftwareServo::refresh();
  }
}

