#include<Servo.h>
Servo myservo;
Servo myservo2;
#define ser 11
#define ser2 10
#define ver A1
#define hor A0
void setup() {
Serial.begin(9600);
myservo.attach(ser);
myservo2.attach(ser2);
}
void loop() {
int vertical = analogRead(A1);
int horizontal = analogRead(A0);
int angle = map(vertical,0,1023,180,0);
int angle2 =map(horizontal,0,1023,0,180);
Serial.print("Vertical ");
Serial.print(vertical);
Serial.print("Horizontal ");
Serial.print(horizontal);
Serial.print("Angle ");
Serial.print(angle);
Serial.print("Angle 2 ");
Serial.println(angle2);
myservo.write(angle);
myservo2.write(angle2);
//output will be 512 cz joystic potentialmeter and joystic is in mid
}