#define POT_PIN 34
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(POT_PIN,INPUT);
}
void loop() {
int potValue=analogRead(POT_PIN);
float voltage=(potValue/4095.0)*3.3;
Serial.print("Raw Value:");
Serial.print(potValue);
Serial.print("| Voltage: ");
Serial.println(voltage);
delay(500);
}
Loading
esp32-devkit-c-v4
esp32-devkit-c-v4