Search code examples
mqttmicropythonraspberry-pi-pico

Can I implement onboard LED blinks as "status" on Umqtt .wait_msg() on Raspeberry Pi Pico W running Micropython?


I'm trying to let the LED keep blinking while waiting in the "wait_msg()" function. can I achieve this by uasycncio, _thread, or modification on the main loop in the module? And how?

Many thanks.


Solution

  • Try the following:

    client.check_msg()
    led.toggle()
    time.sleep(0.1)