fishjoe
fishjoe

Reputation: 49

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.

Upvotes: 0

Views: 103

Answers (1)

Roman Kiss
Roman Kiss

Reputation: 8265

Try the following:

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

Upvotes: 1

Related Questions