Try this
void processCmd(String thing)
{
Serial.println("In processCmd thing is : ");
Serial.print(">>");
Serial.print(thing);
Serial.println("<<");
Serial.println("processCmd is " + thing);//test if made it here so far
if (thing == "X")
{
Serial.println("Made it this far");//test if thing = X. No idea why this does not work, logically it looks OK.
}
}
The output is :
ParseCom - The Command is :X
In processCmd thing is :
>>X
<<
processCmd is X
1234
1257
The Command is :X
Finished
Note what is printed for the value of thing.
Does it equal "X" ?