#include <Servo.h>
   Servo servx;
   Servo servy;
void setup(){

   servx.attach(A2);
   servy.attach(A3);
   pinMode(8, INPUT);
   pinMode(9, INPUT_PULLUP);
   digitalWrite(8, HIGH);
}



void loop(){
  int xAngle = map(analogRead(A0), 0, 1023, 0, 180); // scale it to the servo's angle (0 to 180)
  int yAngle = map(analogRead(A1), 0, 1023, 0, 180); // scale it to the servo's angle (0 to 180)
  servx.write(xAngle);
  servy.write(yAngle);
}
delay(1000);
}
