if i test this in processing:
void setup() {
char t = 'a';
t = '\0';
println(t);
}
then it prints nothing, if i comment the t = '\0'; line then it prints 'a' to the console.
So in this part of your code:
if(index < 19)
{
inData[index++] = inChar;
inData[index] = '\0';
}
Shouldn't this line: inData[index] = '\0';
not be one line higher? (and then ++ switched afcorse).
And about the interfacing serials, i stripped the processing code to this:
import processing.serial.*;
Serial port;
void setup() {
frameRate(1);
println(Serial.list());
port = new Serial(this, Serial.list()[1], 9600);
}
void draw() {
port.write("[");
port.write(frameCount);
port.write("]");
}
my serial monitor output is this:
Received: <>
Receivived: <>
Received: <>
Received: <>
Received: <>
Received: <>
Received: <>
Received: <>
Received: <>
Received: <>