from machine import Pin
import time
led_pin=Pin(22,Pin.OUT)
botao_pin=Pin(14,Pin.IN)
while True:
if botao_pin.value() == 0:
led_pin.value(1)
else:
led_pin.value(0)
time.sleep(1)
from machine import Pin
import time
led_pin=Pin(22,Pin.OUT)
botao_pin=Pin(14,Pin.IN)
while True:
if botao_pin.value() == 0:
led_pin.value(1)
else:
led_pin.value(0)
time.sleep(1)