int potPin = 34;
int potvalue = 0;
int a=2;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(a, OUTPUT);
//Serial.println("Hello, ESP32!");
}
void loop() {
potvalue =analogRead(potPin);
int b =map(potvalue,0,4095,0,255);
analogWrite(a,b);
Serial.println(potvalue);
// put your main code here, to run repeatedly:
delay(100); // this speeds up the simulation
}