import machine
import time
boton=machine.Pin(22,machine.Pin.IN,machine.Pin.PULL_UP)
boton2=machine.Pin(18,machine.Pin.IN,machine.Pin.PULL_UP)
Led=machine.Pin(2,machine.Pin.OUT)
Led2=machine.Pin(5,machine.Pin.OUT)
Led3=machine.Pin(8,machine.Pin.OUT)
Led4=machine.Pin(12,machine.Pin.OUT)
cont=0
aux=2
aux2=2
#MAIN
while True:
aux=boton.value()
aux2=boton2.value()
if(aux==0):
while cont<4:
if(aux==0):
Led.value(1)
cont=cont+1
if(aux==0):
cont1=aux
Led2.value(1)
if(aux==0):
cont2=aux
Led3.value(1)
if(aux==0):
time.sleep(1)
Led4.value(1)
if(aux2==0):
while cont<4:
if(aux2==0):
Led4.value(1)
time.sleep(1)
if(aux2==0):
Led3.value(1)
time.sleep(1)
if(aux2==0):
Led2.value(1)
time.sleep(1)
if(aux2==0):
Led.value(1)
time.sleep(1)