from machine import Pin
from time import sleep
Button1=Pin(1,Pin.IN,Pin.PULL_UP)
Button2=Pin(28,Pin.IN,Pin.PULL_UP)
LED1=Pin(2,Pin.OUT)
LED2=Pin(21,Pin.OUT)
while True:
a=Button1.value()
print(a)
if (a==0):
LED1.value(1)
else:
LED1.value(0)
b=Button2.value()
print(b)
if(b==0):
LED2.value(1)
else:
LED2.value(0)