/* * This ESP32 code is created by esp32io.com * * This ESP32 code is released in the public domain*/ #define VRX_PIN 25 #define VRY_PIN 26 #define Button 27 int valueX = 0; int valueY = 0; void setup() { Serial.begin(9600); pinMode(Button, INPUT); digitalWrite(Button,HIGH); } void loop() { valueX = analogRead(VRX_PIN); valueY = analogRead(VRY_PIN); Button_state = digitalRead(Button); Serial.print("x = "); Serial.print(valueX); Serial.print(", y = "); Serial.println(valueY); delay(100); }