const int Pin_Pot=13, Pin_Led=2;
int Leitura_Pot=0, PWM=0;
void setup()
{
    pinMode(Pin_Pot, INPUT);
    pinMode(Pin_Led, OUTPUT);
    Serial.begin(115200);
}

void loop()
{
    Leitura_Pot = analogRead(Pin_Pot);
    PWM = map(Leitura_Pot, 0, 4095, 255, 0);
    analogWrite(Pin_Led, PWM);
    Serial.println(Leitura_Pot);
    Serial.println(PWM);
    delay(50);
}