from machine import Pin
import time
time.sleep(0.1)
led1 = Pin(12, Pin.OUT)
led2 = Pin(13, Pin.OUT)
b1 = Pin(16, Pin.IN, Pin.PULL_UP)
b2 = Pin(18, Pin.IN, Pin.PULL_UP)
while True:
if b2.value() == 0:
led1.toggle();
if b1.value()== 0:
led2.toggle();
time.sleep_ms(300)