Chat freely about anything...

User avatar
By Dr.Faustus
#72745 Hi to everybody,
i'm working on a smart thermometer, and i've found this tutorial on internet showing how to switch on/off something in local networl. The interface are some html object showed on the page of local ip
Code: Select all// Return the response
  client.println("HTTP/1.1 200 OK");
  client.println("Content-Type: text/html");
  client.println(""); //  do not forget this one
  client.println("<!DOCTYPE HTML>");
  client.println("<html>");
 
  client.print("Led pin is now: ");
 
  if(value == HIGH) {
    client.print("On");
  } else {
    client.print("Off");
  }
  client.println("<br><br>");
  client.println("<a href=\"/LED=ON\"\"><button>Turn On </button></a>");
  client.println("<a href=\"/LED=OFF\"\"><button>Turn Off </button></a><br />"); 
  client.println("</html>");
 
  delay(1);
  Serial.println("Client disonnected");
  Serial.println("");

i would ask you if it's possible, adding a text box, to grab a variable (temperature) with a similar interface...
Many thanks