# How do I use Processing to read and write data to an Arduino

**URL:** https://discourse.processing.org/t/how-do-i-use-processing-to-read-and-write-data-to-an-arduino/21113
**Category:** Electronics (Arduino, etc.)
**Created:** [May 20, 2020, 7:58pm UTC](https://discourse.processing.org/t/how-do-i-use-processing-to-read-and-write-data-to-an-arduino/21113 "2020-05-20T19:58:23Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [June 10, 2020, 5:10pm UTC](https://discourse.processing.org/t/how-do-i-use-processing-to-read-and-write-data-to-an-arduino/21113/10 "2020-06-10T17:10:08Z")

</div>

> [@McLae5](#):
>
> If strings are static, how to I change the text in a string?

```auto
String s = "foo";
s = "bar";

```

The String itself is a static object, but the variable can be reassigned to a new String.

Or, methods on the String don’t change the String, they return a new String – which you assign to the reference.

```auto
s = s.replace('r', 'z'); // bar -> baz

```

---

_[View the full topic](https://discourse.processing.org/t/how-do-i-use-processing-to-read-and-write-data-to-an-arduino/21113)._
