# Reading Pixhawk's pins

**URL:** <https://discuss.bluerobotics.com/t/reading-pixhawks-pins/11334>\
**Category:** General Discussion\
**Created:** [January 13, 2022, 8:28am UTC](https://discuss.bluerobotics.com/t/reading-pixhawks-pins/11334 "2022-01-13T08:28:53Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [January 26, 2022, 8:39pm UTC](https://discuss.bluerobotics.com/t/reading-pixhawks-pins/11334/7 "2022-01-26T20:39:16Z")

</div>

You can wait for multiple message types at once, e.g.

```python
useful_types = ("HEARTBEAT", "STATUSTEXT")

while "waiting for messages":
    message = master.recv_match(type=useful_types, blocking=True, timeout=3)
    if message is None:
        # no messages of interest detected within timeout, including heartbeat
        print("Heartbeat lost!")
    elif message.name == "STATUSTEXT" and message.text == "Leak Detected":
        print("LEAK!!")
    ...

```

* * *

By the way, I’ve edited your comment to include a code block, so it’s easier to read/understand. You can read about how to make them in the [Formatting a Post/Comment](https://discuss.bluerobotics.com/t/how-to-use-the-blue-robotics-forums-please-read/10521#formatting-a-postcomment-15) section of the “How to Use the Forums” post 🙂

---

_[View the full topic](https://discuss.bluerobotics.com/t/reading-pixhawks-pins/11334)._
