const int potPin = 34;
const int ledPin = 15;
// variable for storing the potentiometer value
int potValue = 0;
void setup() {
Serial.begin(115200);
delay(1000);
}
void loop() {
// Reading potentiometer value
potValue = analogRead(potPin);
analogWrite(ledPin,potValue);
Serial.println(potValue);
delay(500);
}