from machine import Pin,ADC
import time
re1=Pin(15,Pin.OUT)
re2=Pin(0,Pin.OUT)
swup=ADC(Pin(26))
swdw=ADC(Pin(27))
while True:
x=swdw.read_u16()
y=swup.read_u16()
time.sleep(0.25)
re1.off()
re2.off()
if y==0:
print('Lowwer LED on')
re2.on()
if y==65535:
print('Upper LED on')
re1.on()
if x==0:
print('Lowwer LED on')
re2.on()
if x==65535:
print('Upper LED on')
re1.on()