/* 03.02.2019 Written by: Gabby Shimoni Description: This program reads the X value and Y value of a joystick and print it to Serial monitor */ #define potXpin A0 #define potYpin A1 int potXval = 0, potYval = 0; void setup() { Serial.begin(9600); } void loop() { potXval = analogRead(potXpin); potYval = analogRead(potYpin); Serial.print("X value = "); Serial.print(potXval); Serial.print(" Y value = "); Serial.println(potYval); delay(100); }