from machine import Pin
from time import sleep
BUTTON = Pin(0, Pin.IN)
BUTTON1 = Pin(1, Pin.IN)
led = Pin(11, Pin.OUT)
led1 = Pin(12, Pin.OUT)
led2 = Pin(13, Pin.OUT)
def hidup():
led.on()
sleep(1)
led.off()
led1.on()
sleep(1)
led1.off()
led2.on()
sleep(1)
led2.off()
def hidup1():
led.on()
sleep(1)
led.off()
led1.on()
sleep(1)
led1.off()
led2.on()
sleep(1)
led2.off()
while True:
print('button =', BUTTON.value())
print('button1 =', BUTTON1.value())
if BUTTON.value() == 1:
hidup()
sleep(1)
if BUTTON1.value() == 1:
hidup1()
sleep
else:
led.off()
sleep(1)