const int LED_PIN = 11;
const int POT_PIN = A1;
void setup() {
pinMode(LED_PIN, OUTPUT);
pinMode(POT_PIN, INPUT);
}
void loop() {
int potValue = analogRead(POT_PIN);
int brightness = map(potValue, 0, 1023, 0, 255);
analogWrite(LED_PIN, brightness);
delay(10);
}