# Microbit ignoring radio message when in "while" loop

**URL:** <https://forum.makecode.com/t/microbit-ignoring-radio-message-when-in-while-loop/5100>\
**Category:** micro:bit\
**Created:** [December 17, 2020, 5:01pm UTC](https://forum.makecode.com/t/microbit-ignoring-radio-message-when-in-while-loop/5100 "2020-12-17T17:01:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![joshkeys19](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/joshkeys19/32/2182_2.png) [@joshkeys19](https://forum.makecode.com/u/joshkeys19)\
**Post date:** [December 19, 2020, 7:17pm UTC](https://forum.makecode.com/t/microbit-ignoring-radio-message-when-in-while-loop/5100/6 "2020-12-19T19:17:53Z")

</div>

Hi Wolfman,

It sounds like you want a bit of a denouncer enabled. An easy way would be to implement a software denouncer.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/9d3ae78179671681afef7d3e3c635cf35ff3d0e4.png)

Your code would be where the hearts are. Every time the button A is pressed, it first checks to see if at least 2000mS have passed since the last time it was pressed.

I hope that helps.

Thanks,  
Josh

---

_[View the full topic](https://forum.makecode.com/t/microbit-ignoring-radio-message-when-in-while-loop/5100)._
