I need help in getting data from the web server code.
I am sending words to a web server using the Ethernet web server code from the 1st Ethernet shield and need the 2nd Ethernet shield to get specific word (eg. Yes) from the web server (using the web client code).
However, I am not able to do so. I try using :
if (client.available())
{
char c = client.read();
if(c=='Yes')
{
Serial.print("Yes obtained");
}
}
Paul raises a good point: 'Yes' has three chars, so how does reading one character magically turn into three characters? Second, you have made several posts on this Forum, and yet you don't post your code according to the directions explained in the first two posts made at the top of this Forum. Please read those and use the code tags ('#') to surround your code. Finally, would this make more sense to you:
if (client.available()) {
char c = client.read();
c = toupper(c);
if (c == 'Y') {
Serial.println("Yes obtained");
}
}