[SOLVED] ArrayIndexOutOfBoundsException: 1

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

  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. :warning: