# \[SOLVED\] ArrayIndexOutOfBoundsException: 1

**URL:** <https://discourse.processing.org/t/solved-arrayindexoutofboundsexception-1/2288>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [August 1, 2018, 10:39pm UTC](https://discourse.processing.org/t/solved-arrayindexoutofboundsexception-1/2288 "2018-08-01T22:39:56Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [August 2, 2018, 10:33am UTC](https://discourse.processing.org/t/solved-arrayindexoutofboundsexception-1/2288/7 "2018-08-02T10:33:08Z")

</div>

For multiple data transmission, I recommend you to read this post below: 🔌

- [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)

1. As you can see, on the Arduino side, separate the data w/ `\t` using **print()** + **write()**.
2. And then send the last data w/ **println()**.
3. On the Processing side, inside **serialEvent()**, use Serial::**readString()** + PApplet.**splitTokens()** in order to get all the data as a String[] array.
4. Of course, you’re still gonna need to convert each data in that received array to their corresponding datatype if that data isn’t a String.
5. And don’t forget to use `bufferUntil(ENTER)` after instantiating the class Serial. ⚠

---

_[View the full topic](https://discourse.processing.org/t/solved-arrayindexoutofboundsexception-1/2288)._
