I ran into a problem while writing an if statement that compares 2 lines
String str1 = Serial.ReadLine();
str1.Trim();
if(str1 == "R_011"){
}
This does not work as it interprets that both lines are different.
I realized that if I replace the Serial input with a string, I compare it with
str1 = "R_011";
it works fine, so it must be something related to what Serial reads.
Can anybody help me? Thank.
source
share