So I have a simple sketch here where I enter a value via the serial monitor and validate the entry with an If statement, but for some reason it's not working even though it did this morning. I've added a couple of Serial.printlns just to verify that my String is being populated but the validation fails every time. Am I totally off my rocker here?
String input;
void setup(){
Serial.begin(19200);
}
void loop(){
if (Serial.available() > 0) {
input=Serial.readString();
Serial.println(input);
if(input == "test"){
Serial.println("True");
}
else{
Serial.println("False");
}
Serial.println(input);
}
}