im trying to nest these if statements together but when i type "test 1" it just keeps repeating working 1 in the console. if i type test 2 it works fine, what am i doing wrong here?
void showNewData() {
if (newData == true) {
Serial.print("This just in ... ");
Serial.println(receivedChars);
if (strcmp(receivedChars, "test 2") == 0) {
Serial.println("working 2");
}
newData = false;
} else
if (strcmp(receivedChars, "test 1") == 0) {
Serial.println("working 1");
}
newData = false;
}