// ********************
// Potentiometer - ADC for teaching purposes at the HTL Anichstraße,
// Department of Biomedicine and Health Technology.
// ********************
// definte input port for voltage measurement (potentiometer)
int analogPin = 26;
// Help variables for programming to store and print the
// analog values resp. voltage values
int analogValue = 0;
//setup (runs once) to initialize the ports
void setup() {
Serial.begin(115200);
Serial.println("Test ADC");
}
void loop() {
delay(10); // this speeds up the simulation for Wokwi only
// ESP32: ADW 3.3V input range, 10-Bit resolution
analogValue = analogRead(analogPin);
//output to serial console
Serial.println(analogValue);
//wait 500ms until reading an new value
delay(500);
}