int led = 11;
int pot = A0;
int potValue = 0;
int mpotValue = 0;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(pot, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
potValue = analogRead(pot);
mpotValue = map(potValue, 0, 1023, 0, 255);
analogWrite(led, mpotValue);
}