from machine import Pin,ADC,PWM
from time import sleep_ms
led=PWM(Pin(25,Pin.OUT))
buzzer=PWM(Pin(14))
buzzer.duty(512)
pot=ADC(Pin(34))
ADC.width(ADC.WIDTH_12BIT)
while 1:
  value=pot.read()
  buzzer.freq(value+1)
  print(value)
  sleep_ms(400)