Might you show me in processing code?
I tried and this is what I got
import processing.serial.*;
Serial port;
//String[] input = {};
float val;
String[] arr_input = new String[2];
int index = 0;
void setup(){
stroke(250);
size(1000, 700);
port = new Serial (this, "COM12", 115200);
port.bufferUntil('\n');
}
void serialEvent(Serial port){
// input = float((port.readStringUntil('\n'));
/*input = splitTokens(*/port.readStringUntil('\n');
}
void draw(){
String[] input = splitTokens(port.readString());
background(1);
arr_input= split(input[index], ',');
index++;
println(input[0]);
println(input[1]);
index = 0;
port.clear();
}
NullPointerException