from machine import Pin
from time import sleep
print("LED with button")
led = Pin( Pin.OUT)
push_button = Pin(21.Pin.IN)
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
print("LED with button")
led = Pin( Pin.OUT)
push_button = Pin(21.Pin.IN)
while True:
logic state = push button.Value()
if logic state == True;
led.value(1)
else:
led.value(0)