So I am a bit in over my head and I'm stuck on what I hope is an easy answer. I have four sensors collecting data on an arduino. I am trying to send that data via serial.print() on the arduino and then collect and pass all four values continuously.

I believe that comport in PD is a good bet here, but I'm not sure how to parse the data as it comes in so I can play with the integers. Any hints would be greatly appreciated!

My arduino code looks like:

int thumbForcePin = 4;
int indexFlexPin = 3;
int middleFlexPin = 2;
int ringFlexPin = 1;

void setup()
{
Serial.begin(9600);
}

void loop()
{
delay(100);
String data = "";

int thumbval = analogRead(thumbForcePin);
thumbval = constrain(thumbval, 320, 560);
int thumblevel = map(thumbval, 320, 560, 127, 0);
data = data + "[" + thumblevel + ";";

int indexval = analogRead(indexFlexPin);
indexval = constrain(indexval, 320, 560);
int indexlevel = map(indexval, 320, 560, 127, 0);
data = data + indexval + ";";

int middleval = analogRead(middleFlexPin);
middleval = constrain(middleval, 320, 560);
int middlelevel = map(middleval, 320, 560, 127, 0);
data = data + middlelevel + ";";

int ringval = analogRead(ringFlexPin);
ringval = constrain(ringval, 320, 560);
int ringlevel = map(ringval, 320, 560, 127, 0);
data = data + ringval + "]";

Serial.print(data);
}