Basic ADC
import machine apin = machine.ADC('D0') # create an analog pin on D0 val = apin.read() # read an analog value print(val)