#include <Servo.h>
Servo myservo1;
Servo myservo2;
int servo1pin=3;
int servo2pin=5;
int button=2;
int vertical=A7;
int horizontal=A6;
int dt=250;
void setup() {
// put your setup code here, to run once:
pinMode(button, INPUT_PULLUP);
pinMode(vertical, INPUT);
pinMode(horizontal, INPUT);
myservo1.attach(servo1pin);
myservo2.attach(servo2pin);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int v=analogRead(vertical);
int h=analogRead(horizontal);
int but=digitalRead(button);
Serial.print(v);
Serial.print("Y");
Serial.print(" | ");
Serial.print(h);
Serial.print("X");
Serial.print(" | ");
Serial.println(but);
delay(dt);
}