#write a micropython script to read the data from a potetiometer connected to GPIO 34 with the rate of 0.5 seconds and to print the same on shell window
from machine import Pin, ADC
from time import sleep
pot = ADC(Pin(34))
pot.atten(ADC.ATTN_11DB)
while True:
pot_value = pot.read()
print(pot_value)
sleep(0.5)