How send multiple values from Processing to Arduino

I’m using shiftr to receive data into processing and I want to send it to Arduino. I’ve stored 8 values into an array and sent it to Arduino as a string. I’m having trouble with receiving the string in Arduino from processing and storing it into 8 separate values to use with a sensor.
each value is a 1 or 0

processing code:

void draw() {
  background(0);
  int[] touchSensor = new int[8];
  touchSensor[0]= Jtouch1;
  touchSensor[1]= Jtouch2;
  touchSensor[2]= AAtouch1;
  touchSensor[3]= AAtouch2;
  touchSensor[4]= ARtouch1;
  touchSensor[5]= ARtouch2;
  touchSensor[6]= Ttouch1;
  touchSensor[7]= Ttouch2;

   String theStg = "<" + nf(touchSensor[0], 1) +
   " " + nf(touchSensor[1], 1) +
   " " + nf(touchSensor[2], 1) +
   " " + nf(touchSensor[3], 1) +
   " " + nf(touchSensor[4], 1) +
   " " + nf(touchSensor[5], 1) +
   " " + nf(touchSensor[6], 1) +
   " " + nf(touchSensor[7], 1) +
   ">";
   myPort.write(theStg);

}

Hello,

Here are some resources:

https://forum.arduino.cc/t/serial-input-basics-updated/382007
http://www.martyncurrey.com/arduino-serial-part-1/ < 4 Parts to this!

:)

There is also these very handy library : VSync

Hi @yohan, One of the fun parts of Serial Comms to Ard is trying to see or imagine what Ard is doing with the string you’ve given it. Various techniques:

Make your Processing sketch print the string. Now save it as text and stop Processing. In Ard IDE, Serial Monitor, paste in the string and enter. Now you can use print statements in the Ard sketch and see what’s happening.

Which Ard are you using? Some have extra serial ports where you could print progress messages and view them via TTL to USB adaptor. You could use OLED or LCD screens.

You could post your Ard sketch. (And the Processing string you’re sending.)