'''
WAMpy script to control toggling rate of an led connect it to
GPIO4 with respect to the nob position of pot connected to GPIO34 of esp32
ldr:NEGATIVE TEMPERATURE QUI
'''
from machine import Pin,ADC
from time import sleep
pot=ADC(Pin(34))
led=Pin(4,Pin.OUT)
pot.atten(ADC.ATTN_11DB)
while True:
potvalue=pot.read()
potvalue=potvalue/1000;
print("BLINKING RATE IS",potvalue)
led.on()
sleep(potvalue)
led.off()
sleep(potvalue)