diff options
Diffstat (limited to 'libraries/Ethernet/examples/WebServer/WebServer.ino')
-rw-r--r-- | libraries/Ethernet/examples/WebServer/WebServer.ino | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libraries/Ethernet/examples/WebServer/WebServer.ino b/libraries/Ethernet/examples/WebServer/WebServer.ino index 0573f05..5e5d67a 100644 --- a/libraries/Ethernet/examples/WebServer/WebServer.ino +++ b/libraries/Ethernet/examples/WebServer/WebServer.ino @@ -22,7 +22,7 @@ // The IP address will be dependent on your local network: byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; -IPAddress ip(192,168,1, 177); +IPAddress ip(192,168,1,177); // Initialize the Ethernet server library // with the IP address and port you want to use @@ -63,12 +63,11 @@ void loop() { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); - client.println("Connection: close"); + client.println("Connection: close"); // the connection will be closed after completion of the response + client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); - // add a meta refresh tag, so the browser pulls again every 5 seconds: - client.println("<meta http-equiv=\"refresh\" content=\"5\">"); // output the value of each analog input pin for (int analogChannel = 0; analogChannel < 6; analogChannel++) { int sensorReading = analogRead(analogChannel); |