mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
@ -22,7 +22,7 @@
|
|||||||
// The IP address will be dependent on your local network:
|
// The IP address will be dependent on your local network:
|
||||||
byte mac[] = {
|
byte mac[] = {
|
||||||
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||||
IPAddress ip(192,168,1, 177);
|
IPAddress ip(192,168,1,177);
|
||||||
|
|
||||||
// Initialize the Ethernet server library
|
// Initialize the Ethernet server library
|
||||||
// with the IP address and port you want to use
|
// with the IP address and port you want to use
|
||||||
@ -64,11 +64,10 @@ void loop() {
|
|||||||
client.println("HTTP/1.1 200 OK");
|
client.println("HTTP/1.1 200 OK");
|
||||||
client.println("Content-Type: text/html");
|
client.println("Content-Type: text/html");
|
||||||
client.println("Connection: close");
|
client.println("Connection: close");
|
||||||
|
client.println("Refresh: 5");
|
||||||
client.println();
|
client.println();
|
||||||
client.println("<!DOCTYPE HTML>");
|
client.println("<!DOCTYPE HTML>");
|
||||||
client.println("<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
|
// output the value of each analog input pin
|
||||||
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
|
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
|
||||||
int sensorReading = analogRead(analogChannel);
|
int sensorReading = analogRead(analogChannel);
|
||||||
|
Reference in New Issue
Block a user