from machine import Pin
from time import sleep
led = Pin(14, Pin.OUT)
push_button = Pin(13, Pin.IN, Pin.PULL_DOWN)
while True:
logic_state = push_button.value()
if logic_state == True:
led.value(1)
else:
led.value(0)
from machine import Pin
from time import sleep
led = Pin(14, Pin.OUT)
push_button = Pin(13, Pin.IN, Pin.PULL_DOWN)
while True:
logic_state = push_button.value()
if logic_state == True:
led.value(1)
else:
led.value(0)