# Showing buttons based on a message received by arduino

**URL:** https://discourse.processing.org/t/showing-buttons-based-on-a-message-received-by-arduino/22235
**Category:** Electronics (Arduino, etc.)
**Created:** [June 29, 2020, 4:33am UTC](https://discourse.processing.org/t/showing-buttons-based-on-a-message-received-by-arduino/22235 "2020-06-29T04:33:58Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [June 29, 2020, 11:16pm UTC](https://discourse.processing.org/t/showing-buttons-based-on-a-message-received-by-arduino/22235/8 "2020-06-29T23:16:09Z")

</div>

> [@mohitSingh](#):
>
> ```auto
> if(message == "ack_on") received = 1;
> if(message == "ack_off") received = 0;
> 
> ```

It is because here, you are putting `0` or `1` inside the received variable but what we want is to use booleans (`true` or `false`) as String.equals(…) returns also a boolean value.

---

_[View the full topic](https://discourse.processing.org/t/showing-buttons-based-on-a-message-received-by-arduino/22235)._
