This is my basic page, but it doesn't work...
#include <SPI.h>
#include <Ethernet.h>
void HTML (void);
int led = 13;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };Â //physical mac address
byte ip[] = { xxx, xxx, xxx, xxx };Â Â Â Â Â Â Â Â Â Â Â // ip in lan (that's what you need to use in your browser. ("192.168.1.178")
byte gateway[] = { 192, 168, 1, 1 };Â Â Â Â Â Â Â Â Â // internet access via router
byte subnet[] = { 255, 255, 255, 0 };Â Â Â Â Â Â Â Â Â //subnet mask
EthernetServer server(80); //server port
EthernetClient client;
String readString;
void setup() {
 Serial.begin(9600);
 pinMode(led, OUTPUT);
 // start the Ethernet connection and the server:
 Ethernet.begin(mac, ip, gateway, subnet);
 server.begin();
 Serial.println(Ethernet.localIP());
}
void loop() {
 // Create a client connection
 EthernetClient client = server.available();
 if (client) {
  while (client.connected()) {Â
   if (client.available()) {
    char c = client.read();
    //read char by char HTTP request
    if (readString.length() < 100) {
     //store characters to string
     readString += c;
     //Serial.print(c);
    }
    //if HTTP request has ended
    if (c == '\n') {
     Serial.println(readString);   Â
      client.println("HTTP/1.1 200 OK"); //send new page
      client.println("Content-Type: text/html");
      client.println(); Â
      client.println("<HTML>");
      client.println("<BODY>");
      client.println("<TITLE>Cascina</TITLE>");
      client.println("<center>");
      client.println("<H1>Cascina</H1>");
      client.println("</BODY>");
      client.println("</HTML>");
      client.stop();
    }
   }
  }
}
}
I realized that the part to edit to customize the page and this one:
Serial.println(readString);Â Â Â Â
      client.println("HTTP/1.1 200 OK"); //send new page
      client.println("Content-Type: text/html");
      client.println(); Â
      client.println("<HTML>");
      client.println("<BODY>");
      client.println("<TITLE>Cascina</TITLE>");
      client.println("<center>");
      client.println("<H1>Cascina</H1>");
      client.println("</BODY>");
      client.println("</HTML>");
      client.stop();
But I don't know how to translate the commands I've done for my HTML page in arduino language...
This is the page that I want to make (it worked by me on the notepad)...
<!DOCTYPE html>
<html>
<head>
<style>
html {
 background: url(file:///C:/Users/lucam/Pictures/foto-baita-luca.jpg) no-repeat center fixed;
 background-size: cover;
}Â Â Â Â
div.ON {
 position: fixed;
 top: 70%;
 left: 20%;
}
div.OFF {
 position: fixed;
 top: 70%;
 right:20%;
}
.button {
 background-color: #4CAF50; /* Green */
 border: none;
 color: Black;
 text-align: center;
 text-decoration: none;
 display: inline-block;
 font-size: 200%;
}
.button1 {padding: 20% 24%;}
.button2 {padding: 15% 5%;}
</style>
</head>
<body>
<center>
<h1 style="font-size:300%;background-color:DodgerBlue;">Cascina Mozzini</h1>
</center>
<div class="ON">
<button class="button button1">ON</button>
</div>
<div class="OFF">
<button class="button button2">OFF</button>
</div>
</body>
</html>
Can someone give me an example of how to start then I'll go on, at least the basic commands... isn't there a guide that explains how to do HTML on Arduino?
Everyone tells me it's the same thing to write HTML commands on Arduino but they don't work...
and even visually they don't look the same to me