int pot = 32;
int led = 4;
void setup() {
// put your setup code here, to run once:
pinMode(pot, INPUT);
pinMode(led, OUTPUT);
Serial.begin(115200);
Serial.println(" ");
}
int valorPot;
int valorNovo;
void loop() {
valorPot = analogRead(pot);
valorNovo = map(valorPot,0, 4095, 0, 255);
analogWrite(led,valorNovo);
Serial.println(valorNovo);
// put your main code here, to run repeatedly:
delay(300); // this speeds up the simulation
}