Microbit ignoring radio message when in "while" loop

Hi wolfman,

Try using a basic.pause instead of a wait. The pause allows the micro:bit scheduler to check for any events whereas I believe the waitMicros will only check if you sleep longer than 50000 us. You can see this in scheduler.cpp:

There you see that when you use the basic.pause( which calls sleep_ms), it will call the scheduler. If you use waitMicros, it calls the sleep_us and will internally call the sleep_ms if us >50000.

So in short, try using basic.pause instead to allow the scheduler to check for radio events.

3 Likes