from machine import Pin
from time import sleep
button_pin = Pin(5,Pin.IN,Pin.PULL_DOWN)
led_pin = Pin(4,Pin.OUT)
while True:
if button_pin.value() == 1 :
led_pin.value(1)
else:
led_pin.value(0)
from machine import Pin
from time import sleep
button_pin = Pin(5,Pin.IN,Pin.PULL_DOWN)
led_pin = Pin(4,Pin.OUT)
while True:
if button_pin.value() == 1 :
led_pin.value(1)
else:
led_pin.value(0)