from machine import Pin, ADC
from time import sleep_ms

sensor = ADC(Pin(28))
x = 10000

sleep_ms(5)
print ('Tudo Pronto')

while True:
    valor = sensor.read_u16()
    v = valor/65535 * 3.3
    print (f'Valor lido: {valor}, tensão: {v}')
    if valor > x:
        print ('Escuro')
    else:
        print ('Claro')
    sleep_ms(2000)

# shunt
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT