Advertisement
fraczek95

Untitled

Jun 9th, 2019
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.println("HTTP/1.1 200 OK");
  2. client.println("Content-Type: text/html");
  3. client.println("Connection: close");  // the connection will be closed after completion of the response
  4. client.println();
  5. client.println("<!DOCTYPE HTML><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
  6. client.println("<meta charset=\"UTF-8\"/>");
  7. client.println("</head>");
  8. client.println("<body>");
  9. if (alarm_w_temp == false && alarm_temp == false)
  10. {
  11.   client.println("<h1 style=\"color:green;\">Brak zagrożenia pożarowego</h1>");
  12. }
  13.          
  14. if (alarm_w_temp == true)
  15. {
  16.   client.println("<h1 style=\"color:red;\">Alarm: wykryto wzrost temp. >20 st. C od ostatniego pomiaru</h1>");
  17. }
  18.          
  19. if (alarm_temp == true)
  20. {
  21.   client.println("<h1 style=\"color:red;\">Alarm: wykryto obiekt o temp >100 st. C</h1>");
  22. }
  23.                    
  24. client.println("<table cellpadding = 0 cellspacing = 0 font size = 1>");
  25.                    
  26. int nr_px = 0;  //TABLICA KOLORÓW I TEMPERATURY JEST JEDNOWMIAROWA DLATEGO POTRZEBA ZMIENNEJ NR_PX
  27.        
  28. for (int y=0; y<24; y++)
  29. {
  30.   client.println("<tr height = 30px>");
  31.   for (int x=1; x<=32; x++)
  32.   {
  33.     client.println("<td width=30px bgcolor="+obraz[nr_px]+">"+temp[nr_px]+"<td/>");
  34.     nr_px++;
  35.   }
  36.   client.println("<tr/>");
  37. }
  38. client.println("<table/>");
  39. client.println("<script>");
  40. client.println("window.location.reload(true);");
  41. client.println("</script>");
  42. client.println("</body></html>");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement