#define switch_pin 7
#define x_pin A0
#define y_pin A1
#define SERIAL 9600
void setup()
{
Serial.begin(SERIAL);
pinMode(switch_pin, INPUT_PULLUP);
}
void loop()
{
int x, y;
x = analogRead(x_pin);
y = analogRead(y_pin);
Serial.print(digitalRead(switch_pin));
Serial.print(" ");
Serial.print(x);
Serial.print(" ");
Serial.println(y);
delay(SERIAL/100);
}