# Save Arduino input in array, and THEN plot it

**URL:** <https://discourse.processing.org/t/save-arduino-input-in-array-and-then-plot-it/11499>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [May 22, 2019, 4:07pm UTC](https://discourse.processing.org/t/save-arduino-input-in-array-and-then-plot-it/11499 "2019-05-22T16:07:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [May 22, 2019, 4:21pm UTC](https://discourse.processing.org/t/save-arduino-input-in-array-and-then-plot-it/11499/2 "2019-05-22T16:21:05Z")

</div>

> [@Using two different readStringUntil "characters"](https://discourse.processing.org/t/using-two-different-readstringuntil-characters/10769/23):
>
> Now that it seems all’s been sorted out, how about some optimization? The range [-10 to 10] is so small (5-bit) that it comfortably fits in a byte (8-bit). So, rather than send those 2 small values as TSV, w/ lotsa extra separator characters, we can simply send 2 bytes only using Serial.write(): [https://www.Arduino.cc/reference/en/language/functions/communication/serial/write/](https://www.Arduino.cc/reference/en/language/functions/communication/serial/write/) We just need to create a char array of length = 2: signed char xy[2]; #define BAUDS 115200 #define DELAY 10 #define…

---

_[View the full topic](https://discourse.processing.org/t/save-arduino-input-in-array-and-then-plot-it/11499)._
