import time
time.sleep(0.1) # Wait for USB to become ready
from machine import Pin, UART
import utime
led = Pin(5, Pin.OUT)
def callback(msg):
print(msg)
if msg == "ON":
led.on()
if msg == "OFF":
led.off()
while True:
ent = input("Entrada de comando\n")
callback(ent)