# Este programa está diseñado por Wilson Perez y se activa la resistencia in
from machine import Pin
import utime
#Creando los objetos
interruptor = Pin(32, Pin.IN, Pin.PULL_UP)
ledInterno =Pin(2, Pin.OUT)
while True:
medicion = interruptor.value()
print (medicion)
utime.sleep_ms(1000)
if medicion == 0:
ledInterno.value(1)
print("Se encendió el led")
else:
ledInterno.value(0)
print("Esta apagado el Led")