#define RotPot 13
#define SliPot 12
float x = 0;
float y = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
x = analogRead(RotPot);
y = analogRead(SliPot);
float r = x/4095 * 3.3;
float s = y/4095 * 3.3;
Serial.print("Rotary value: ");
Serial.print(x);
Serial.print(" = ");
Serial.println(r);
Serial.print("Sliding value: ");
Serial.print(y);
Serial.print(" = ");
Serial.println(s);
delay(2000); // this speeds up the simulation
}