Send variable from arduino to processing: Error while disabling serialEvent () for COM4 null

Hello,

You are sending 4 commas so there will be 5 data elements “split” for a complete set of your data.
You do not need to send that last comma from the Arduino.

The “null” after the Error is the concern and it was from the array having “null” elements;
image

Checking for the length of data array received solves this.

Below tried and tested:

      int [] seperateValues = int(split(completeString, ','));   // Split the string everytime a delimiter is received
      println(seperateValues.length);
      if (seperateValues.length == 5)
        {
        feld1 = seperateValues[0];
        feld2 = seperateValues[1];
        feld3 = seperateValues[2];
        feld4 = seperateValues[3];
        printArray(seperateValues); // You will see 5 elements
        }