/////////////////////////////
htmlRes += HtmlTitle2;
if(stateLED2 == LOW){
htmlRes += HtmlLed2StateLow;
}else{
htmlRes += HtmlLed2StateHigh;
}
htmlRes += HtmlButton2;
///////////////////////////////
///////////////////////////////
htmlRes += HtmlTitle3;
if(stateLED3 == LOW){
htmlRes += HtmlLed3StateLow;
}else{
htmlRes += HtmlLed3StateHigh;
}
htmlRes += HtmlButton3;
////////////////////////////////
///////////////////////////////
htmlRes += HtmlTitle4;
if(stateLED4 == LOW){
htmlRes += HtmlLed4StateLow;
}else{
htmlRes += HtmlLed4StateHigh;
}
htmlRes += HtmlButton4;
////////////////////////////////
// ========RELOAD=============
htmlRes += "<div style=\"text-align:center; font-family:calibri; font-size:12px; margin-top: 15px; margin-bottom: 10px; \"><a href=\"/\"><button style=\"width:170px; height:25px;background: #A59070; -moz-border-radius:5px; border-radius:5px; \">http://192.168.1.100//</button></a></div>";
// ========RELOAD=============
// Подстчет времени наработки
// =================================================================================================================================
String cl = ("<p style=\"text-align: center; font-family:Courier New; color:#EFB30B ; font-size: 12px; margin-top: 2px; padding: 2px 2px; background-color:#1C5A9F; \"\r\n\r\n<!DOCTYPE HTML>\r\n<html>\r\n Online ");
int Sec = (millis() / 1000UL) % 60;
int Min = ((millis() / 1000UL) / 60UL) % 60;
int Hours = ((millis() / 1000UL) / 3600UL) % 24;
int Day = ((millis() / 1000UL) / 3600UL / 24UL);
cl += Day;
cl += "day";
cl += ":";
cl += Hours;
cl += "h";
cl += ":";
cl += Min;
cl += "m";
cl += ":";
cl += Sec;
cl += "s";
cl += "</html>\n";
htmlRes += (cl);
//===================================================================================================================================
//===================================================================================================================================
String w = ("<p style=\"text-align: center; font-family:Courier New; color:#EFB30B ; font-size: 12px; margin-top: -10px; padding: 2px 2px; background-color:#1C5A9F; \"\r\n\r\n<!DOCTYPE HTML>\r\n<html>\r\n WiFi: ­­ ");
long rssi = WiFi.RSSI(); // get dBm from the ESP8266
w += (rssi);
w += "dB ­­ ";
w += (rssi + 120); //~ 100% ??
w += "%";
w += "</html>\n";
htmlRes += (w);
//====================================================================================================================================
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
String v = ("<p style=\"text-align: center; font-family:Courier New; color:#EFB30B ; font-size: 12px; margin-top: -10px; padding: 2px 2px; background-color:#1C5A9F; \"\r\n\r\n<!DOCTYPE HTML>\r\n<html>\r\n Power Vcc: ­­ ");
float vcc = ESP.getVcc() / 1000.0;
v += (vcc);
v += "V";
htmlRes += (v);
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
String t = ("<p style=\"text-align: center; font-family:Courier New; color:#05FFD6; font-size: 13px; margin-top: -10px; padding: 1px 1px; background-color:#BF4A05; \"\r\n\r\n<!DOCTYPE HTML>\r\n<html>\r\n Temp: ­");
t += (sensors.getTempCByIndex(0));
t += " C`";
htmlRes += (t);
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
htmlRes += HtmlTitle21;
htmlRes += "<p style=\"text-align: center; font-size: 7px; color:#8B9197; margin-top: 2px; margin-bottom: 2px;\">Buzzer GPIO10(D3), ­ Led - GPIO0 , ­ T` GPIO02</p>";
htmlRes += "<p style=\"text-align: center; font-size: 7px; color:#8B9197; margin-top: 2px; margin-bottom: 2px;\">Key 1 - GPIO16(XPD), ­ 2 - GPIO4, ­ *3 - GPIO15*</p>";
server.send(200, "text/html", htmlRes);
}
//=================================================================================================================
void loop()
{
ArduinoOTA.handle(); // Всегда готовы к прошивке
server.handleClient();
////////////////////////////////////////// 1Canal ext key
if(digitalRead(D5_pin)==LOW&&key1==0)
{
delay(500);
key1++;
digitalWrite(13, !digitalRead(13));
}
if(digitalRead(D5_pin)==HIGH&&key1==1)
{
key1=0;
}
/////////////////////////////////////////////////////////
////////////////////////////////////////// 2Canal ext key
if(digitalRead(D6_pin)==LOW&&key2==0)
{
delay(500);//защита от дребезга
key2++;