from machine import Pin
from time import sleep
l1 = Pin(12, Pin.OUT)
l3 = Pin(13, Pin.OUT)
l2 = Pin(14, Pin.OUT)
b1 = Pin(5, Pin.IN, Pin.PULL.UP)
b2 = Pin(19, Pin.IN, Pin.PULL.UP)
b3 = Pin(4, Pin.IN, Pin.PULL.UP)
while True:
l1.value(not b1.value())
l2.value(not b2.value())
l3.value(not b3.value())
if b1.value() == 0:
l1.on()
print(1)
sleep(0.15)
if b2.value() == 0:
l2.on()
print(2)
sleep(0.15)
if b3.value() == 0:
l3.on()
print(3)
sleep(0.15)