#include <Servo.h>
Servo servo1;
Servo servo2;
int joyX = 0;
int joyY = 1;
int H;
int V;
void setup() {
// put your setup code here, to run once:
servo1.attach(2);
servo2.attach(3);
}
void loop() {
// put your main code here, to run repeatedly:
H = analogRead(joyX);
H = map(H, 0, 1023, 0, 180);
servo1.write(H);
V = analogRead(joyY);
V = map(V, 0, 1023, 0, 180);
servo2.write(V);
}