import machine
import utime
led_externo = machine.Pin(7, machine.Pin.OUT)
boton = machine.Pin(18, machine.Pin.IN, machine.Pin.PULL_UP)
while True:
if boton.value() == 0:
led_externo.value(0)
else:
led_externo.value(1)
import machine
import utime
led_externo = machine.Pin(7, machine.Pin.OUT)
boton = machine.Pin(18, machine.Pin.IN, machine.Pin.PULL_UP)
while True:
if boton.value() == 0:
led_externo.value(0)
else:
led_externo.value(1)