from machine import Pin
from time import sleep
led=Pin(0,Pin.OUT)
push_button=Pin(19,Pin.IN,Pin.PULL_UP)
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(0,Pin.OUT)
push_button=Pin(19,Pin.IN,Pin.PULL_UP)
while True:
logic_state=push_button.value()
if logic_state==True:
led.value(1)
else:
led.value(0)