int ledPin=25;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
int potValue=0;
int brightValue=0;
void loop() {
potValue = analogRead(A0);
brightValue = map(potValue, 0, 1023, 0, 255);
analogWrite(ledPin, brightValue);
Serial.println(potValue);
Serial.println(brightValue);
delay(1000);
}