TolpuddleSartre:
Assigned '\0' to the first element.
i did this and cleared the string and it still is doing the same thing??
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");
receivedChars[numChars] = '\0';
}
also when it keeps printing working 1 if i type test 2 it prints test 2 q time and stops like its suppose to?