#define XJOY A1
#define YJOY A2
#define SEL_PIN 2
void setup() {
pinMode(SEL_PIN, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
int joyX = map(analogRead(XJOY), 0, 1023, -100, 100);
int joyY = map(analogRead(YJOY), 0, 1023, -100, 100);
bool selPressed = digitalRead(SEL_PIN) == LOW;
Serial.print(joyX);
Serial.print(", ");
Serial.println(joyY);
Serial.println(selPressed);
}