I have seen this subject in some threads, but cant make it work yet to compare
I send a char* from my serial message, I can log it ok ,but comparison with an specific word is not working
void entro(char* valu)
{
Serial.println("tomad:");
Serial.println(valu);
String mystr = String(valu);
Serial.println("tomad tu strg::" + mystr);
String ss = String("ss9");
if (mystr == ss)
{
Serial.println("si docto!");
} //not working
if (strcmp(valu, "ss9") == 0) // test to see if the two strings are equal
{
Serial.print("tkt");
} //not working
}
So what is missing? how to compare the char* with a string?
thanks!