TolpuddleSartre:
Because the strings remain equal, because you're not resetting or clearing the received string?
im not sure what you mean. how do i clear a string. its weird because test 2 works just fine but test 1 just keeps printing? the top half of this code works untill test 1 which just keeps repeating. i though newdata = false; was suppose to take care of that?
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;
}
if (strcmp(receivedChars, "test 1") == 0) {
Serial.println("working 1");
}
newData = false;
}