Go Down

Topic: WifiChatServer example code error (Read 56 times) previous topic - next topic


Wifi and Wifi101 examples are not working with library versions:

Wifi101    0.14.0
Wifi          1.2.7

"server" on line 5 should be replaced by "client".

Incorrect code:

1    if (client.available() > 0) {
2      // read the bytes incoming from the client:
3      char thisChar = client.read();
4      // echo the bytes back to the client:
5      server.write(thisChar);
6    }

After making the described change the chat server became very reliable!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131