from machine import Pin
import time
led1= Pin(0,Pin.OUT)
led2= Pin(1,Pin.OUT)
pulsador= Pin(27, Pin.IN, Pin.PULL_DOWN)
dip1= Pin(17, Pin.In)
dip2= Pin(16, Pin.In)
estado=0
print(estado)
while True:
if pulsador.value()==1 :
estado= estado+1
print(estado)
time.sleep(1)
else:
led1.value(0)
led2.value(0)
if (estado==3)and(dip1.value()==1) and (dip2.value()==1)
led1.value(1)
time.sleep(1)
led1.value(0)
led2.value(1)
time.sleep(1)
led2.value(0)