from machine import Pin
import time
led1_pin = Pin(0,Pin.OUT)
button1_pin = Pin(2,Pin.IN,Pin.PULL_UP)
while 1:
led1_pin.value(button1_pin.value())
print(button_pin.value())
time.sleep(1)
from machine import Pin
import time
led1_pin = Pin(0,Pin.OUT)
button1_pin = Pin(2,Pin.IN,Pin.PULL_UP)
while 1:
led1_pin.value(button1_pin.value())
print(button_pin.value())
time.sleep(1)