Hi there,
I'm trying to use NOT but unfortunately even with the codes below, arduino never gets into the second if.
if((readString.indexOf("test") >0) && (readString.indexOf("test2") >0))
{
//1
}//checks for test words
if((!readString.indexOf("test") >0) && (!readString.indexOf("test2") >0))
{
//2
} //check if there aren't any test words
No1 is working like a charm but No2 isn't for some reason.
When I check for 1, I type "test" and "test2", but when I check for 2 I type other words. It never gets into 2.
Can anyone explain to me why this is happening?