from machine import Pin, ADC
import time
pot = ADC(Pin(34))
pot.atten(ADC.ATTN_11DB)
pot.width(ADC.WIDTH_10BIT)
while True:
pot_value = pot.read()
voltage = pot_value * (3.3 / 1023)
print("POT Value:", pot_value, " Voltage:", round(voltage, 2), "V")
time.sleep(0.5)