# Arduino to Processing String Comparison Error

**URL:** <https://discourse.processing.org/t/arduino-to-processing-string-comparison-error/15968>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [November 30, 2019, 3:55am UTC](https://discourse.processing.org/t/arduino-to-processing-string-comparison-error/15968 "2019-11-30T03:55:00Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [November 30, 2019, 10:43am UTC](https://discourse.processing.org/t/arduino-to-processing-string-comparison-error/15968/10 "2019-11-30T10:43:04Z")

</div>

> [@\[SOLVED\] ArrayIndexOutOfBoundsException: 1](https://discourse.processing.org/t/solved-arrayindexoutofboundsexception-1/2288/7):
>
> For multiple data transmission, I recommend you to read this post below: electric_plug[Forum.Processing.org/two/discussion/16618/processing-with-arduino-void-serialevent#Item\_1](http://Forum.Processing.org/two/discussion/16618/processing-with-arduino-void-serialevent#Item_1) As you can see, on the Arduino side, separate the data w/ \t using print() + write(). And then send the last data w/ println(). On the Processing side, inside serialEvent(), use Serial::readString() + PApplet.splitTokens() in order to get all the data as a String[] array. Of course, you’re still gonna need to conver…

> [@Using two different readStringUntil "characters"](https://discourse.processing.org/t/using-two-different-readstringuntil-characters/10769/17):
>
> Well, I don’t have any Arduino hardware and neither even seen 1 in front of me yet! woozy_face So I can only do blind coding in the dark for you. dark_sunglasses Theoretically, an Arduino C code like this 1: thinking void setup() { Serial.begin(115200); } void loop() { const int x = map(analogRead(A1), 0, 1023, -10, 10); const int y = map(analogRead(A0), 0, 1023, -10, 10); Serial.print(x); // "-5" Serial.write('\t'); // '\t' Serial.println(y); // "10" + "\r\n" delay…

---

_[View the full topic](https://discourse.processing.org/t/arduino-to-processing-string-comparison-error/15968)._
