#define led 8
#define pol A0
int polValue=0;
void setup() {
  // put your setup code here, to run once:
  
}

void loop() {
  // put your main code here, to run repeatedly:
  polValue = analogRead(pol);
  polValue = map(polValue, 0, 1023, 0, 255);
  analogWrite(led, polValue);
}