Hello! i use my Arduino to send over serial - messages like "Fail=1." "Fail=2." or "Otvet=1" etc.
i use code
` void serialEvent(Serial port) {
String input = port.readStringUntil('.');
if (input != null) { // Print message received println(input);
if (input.equals("Otvet=1")==true)
{
println("OTVET 1");
// fill(0, 255, 0);
// ellipse(56, 46, 55, 55);
}
if (input.equals("Fail=1")==true)
{
println("FAILSTART=1");
// fill(255, 0, 0);
// ellipse(500, 500, 55, 55);
}
}
} `
and - IF working ONLY one time - if first message from Arduino is "Otvet=1." and next is "Fail=1." - i see first "OTVET 1" in console but after this i dont see FAILSTART=1...
What i do wrong?
Thanks. Sorry my bad English