const int led = 4; // pin do led
const int pot = 2; // pin do potenciometro
int pote = 0; // estado do potenciometro


void setup() {
  Serial.begin(115200);

  pinMode(led, OUTPUT);
  pinMode(pot, INPUT);
}

void loop() {
pote = analogRead(pot); //pin do potenciometro
delay(10);
Serial.println(pote);
pote = map(pote, 0, 4095, 0, 255);
Serial.println("pot 2: "); Serial.println(pote);
analogWrite(led, pote);
delay(1000);


 

}
$abcdeabcde151015202530fghijfghij
$abcdeabcde151015202530fghijfghij