# 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:** 3

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [June 29, 2020, 10:20am UTC](https://discourse.processing.org/t/showing-buttons-based-on-a-message-received-by-arduino/22235/3 "2020-06-29T10:20:20Z")

</div>

> [@josephh](#):
>
> `if(message == "ack_on") received = true;`

> **[equals() / Reference](https://processing.org/reference/String_equals_.html)**
>
> Compares two strings to see if they are the same. This method is necessary because it's not possible to compare strings using the equality operator (==). Returns true if the strings are the sam…

```auto
boolean received;

void draw() {
  background(150);

  if (received) {
    // ...
  }
}

void receive(...) {
  received = "ack_on".equals(message);
}

```

---

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