Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Thank you for the response and the suggestions. I initially assumed the same about sending data to every client and refreshing but it does not produce the desired effect. I set updates to every second but it feels like it takes something like 30s updating on the computer and even worse on a mobile device. I have to force the mobile device's reload more often than not. To circle back to the server.println(), if that is the command that sends data to every client on the server, wouldn't that make it the one to use for multi-client setups. Would client.read/available be affected? Thanks again Commented Feb 25, 2015 at 22:24
  • @DaveP, forgive me for not following the proper forum etiquette but I am not able to upvote until I have 15 rep. While the reply was useful, my question has not yet been answered since I still don't understand why a WiFiWebServer example would use a client.print versus a server.print. Commented Feb 27, 2015 at 15:09
  • You would want to refresh it instead of sending more data unless you want it to keep logging the temperature to the client. If you add refresh code to the top then close the connection it will update the web page every x seconds. Commented Feb 28, 2015 at 19:45
  • @user3303997 my code, which follows the Arduino WebServer example, includes two lines "Connection: close" and "Refresh : 1". Based on the example notes, this means that it closes the connection after the completion of the response and refreshes every second. Despite the setting, the refresh rate is nowhere near 1 second - do I need to close the connection in Arduino code? I thought the http code was sufficient. Commented Mar 6, 2015 at 17:10
  • I suggest using the meta refresh i posted above and close the connection in arduino. Commented Mar 7, 2015 at 16:38