from machine import Pin
import time
ledr = Pin(19, Pin.OUT)
ledg = Pin(18, Pin.OUT)
ledb = Pin(5, Pin.OUT)
ledy = Pin(17, Pin.OUT)
pr = Pin(12, Pin.IN)
pg = Pin(14, Pin.IN)
pb = Pin(28, Pin.IN)
py = Pin(26, Pin.IN)
while True:
if pr == True:
ledr.on()
time.sleep(1)
elif pr == False:
ledr.off()
time.sleep(1)
elif pg == True:
ledg.on()
time.sleep(1)
elif pg == False
ledg.off()
time.sleep(1)
elif pb == True:
ledg.on()
time.sleep(1)