import time as t
import machine as m
led = m.Pin(26, m.Pin.OUT)
boton = m.Pin(7, m.Pin.IN, m.Pin.PULL_UP )
while True:
print("Estado:", boton.value())
if boton.value()==0:
led.value(1)
else:
led.value(0)
import time as t
import machine as m
led = m.Pin(26, m.Pin.OUT)
boton = m.Pin(7, m.Pin.IN, m.Pin.PULL_UP )
while True:
print("Estado:", boton.value())
if boton.value()==0:
led.value(1)
else:
led.value(0)