int ledPin = 2;
int potensioPin = 34;
int val = 0;
void setup()
{
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);
}

void loop(){
  val = analogRead(potensioPin);
  analogWrite(ledPin, val / 4);
  Serial.println(val);
}