#write a micropython script to read the data from a potentiometer connected to GPIO34 with a rate of 0.5 second and to print the same on sell 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.1)