Hello folks !
I'm a total beginner in Arduino, and it was originally not going to be a part of my project, but my team mate doing it didn't really do it, ahah.
Here is the code :
if (client.available())
{
Serial.print("From client: \"");
while (client.available())
{
Serial.print((char)client.read());
}
Serial.println("\"");
}
So, I tried many time to put a condition inside the while, like if(strcmp((var)client.read(), "blah" == 0). I want to check if the string received through client.read() equals the word blah. I tried many things but never succeeded as my understanding of the little gears of C is small. Can anyone show me an example I could use and learn from ?
Thank you in advance !
Regards
if that's what you were trying to write.
You need to get the () to balance in the right places.
.read() returns only one character - no good for comparing with "blah", so you may need to go back to the drawing board. There are MANY examples of reading & parsing from character streams.