from machine import ADC, Pin 
from time import sleep

photoPIN = 28

def readLight (photoGP):
    photoRes = ADC (Pin(28))
    light = photoRes.read_u16()
    light = round(light/65535*100,2)
    return light

while True:
    print("light:" + str(readLight (photoPIN)) + "%")
    sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT