I really don't know what to do. Here's the problem: I'm receiving a String from the Serial Port in Processing and want to compare it with an if-clause. So, here's the code:
while (myPort.available() > 0) {
myString = myPort.readStringUntil(lf);
if (myString != null) {
String [] postString = split(myString, 'R');
if (postString[0] == "0") println("Success");
else println (postString[0]);
}
Normally, if there comes 0 from the Serial Port, the if-clause has to become true, but even if there comes 0, it always prints 0 (via else) out. There is no character more, it only prints 0, so I have no idea, why the if-clause has no function. Any idea?!