from machine import ADC
from time import sleep
# ejemplo simple de entrada analogica convertida a digital
potentiometer = ADC(26)
while True:
print(potentiometer.read_u16()) # read unsigned 16 bit
sleep(2)
# unsigned 16-bit integer --> lecturas entre 0 y 65,535