import time
import board
import digitalio
import random
from analogio import AnalogIn

analog_in = AnalogIn(board.GP28)

light = digitalio.DigitalInOut(board.GP20)
light.direction = digitalio.Direction.INPUT

def get_voltage(pin):
    return (pin.value * 3.3) / 65536

while True:
    print(light.value)
    print((get_voltage(analog_in),))
    time.sleep(0.1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT