int pot = 14;
int led = 15;
void setup() {
  pinMode(pot, INPUT);
  pinMode(led, OUTPUT);

}

void loop() {
  int value = analogRead(pot);
  int x = map(value,0,1023,0,255);
  analogWrite(led,x);
}