const int LED_pin=11;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
int value=analogRead(A0);
int brightness=map(value,0,1023,0,255);
analogWrite(LED_pin,brightness);
delay(20);
}