from machine import Pin
from time import sleep
Potpin=28
myPot=machine.ADC(Potpin)
LED=Pin(2,Pin.OUT)
while True:
potval=myPot.read_u16()
voltage=(3.3/65535)*potval
print(voltage)
LED.value(voltage)
from machine import Pin
from time import sleep
Potpin=28
myPot=machine.ADC(Potpin)
LED=Pin(2,Pin.OUT)
while True:
potval=myPot.read_u16()
voltage=(3.3/65535)*potval
print(voltage)
LED.value(voltage)