int potPin=3;
int ledPin=5;
int dt=500;
int potValue=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(potPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop() {
potValue=analogRead(potPin);
analogWrite(ledPin,potValue);
Serial.print("PotValue=");
Serial.println(potValue);
delay(dt);
}