from machine import Pin , PWM , ADC
from time import sleep

p=PWM(pin(0))
t=ADC(Pin(34))

while True :
    p.duty(int(t.read()/4095*1023))
    print(int(t.read()/4095*1023))