from machine import Pin, ADC, PWM
import time

led_pin = 17
pot_pin = 35

led = PWM(Pin(led_pin))
pot = ADC(Pin(pot_pin))

while True:
    pot_value = pot.read()
    if pot_value is not None:
        brilho = int((pot_value / 4095) * 1023) 
        led.duty(brilho)
        print("Pot value:", pot_value)
        print("brilho:", brilho)
    time.sleep(1)