from machine import Pin
pin_button =Pin(0, Pin.IN, pull=Pin.PULL_UP)
pin_led =Pin(4,Pin.OUT)
while True :
if pin_button.value() == 1:
pin_led.on()
else :
pin_led.off()
from machine import Pin
pin_button =Pin(0, Pin.IN, pull=Pin.PULL_UP)
pin_led =Pin(4,Pin.OUT)
while True :
if pin_button.value() == 1:
pin_led.on()
else :
pin_led.off()