from machine import Pin
import utime
led = Pin(17, Pin.OUT)
while True:
comando = input("Ingresa comando (on/off): ").strip()
if comando == "on":
led.on()
print("LED encendido")
elif comando == "off":
led.off()
print("LED apagado")
else:
print("Comando no válido")