from machine import ADC, Pin
from time import sleep

adc = ADC(Pin(34)) # create an ADC object acting on a pin
adc.atten(ADC.ATTN_11DB) # 3.3V max

while True:
     print("Analog Value: " , adc.read())
     sleep(1)