diff --git a/ESP8266_Code/ESP8266_Code.ino b/ESP8266_Code/ESP8266_Code.ino index fd583431..b3f0885e 100644 --- a/ESP8266_Code/ESP8266_Code.ino +++ b/ESP8266_Code/ESP8266_Code.ino @@ -205,6 +205,26 @@ const char WEBSITE[] PROGMEM = R"=====( Miner version +)=====" +#ifdef USE_DHT +"
" +"
" +" @@TEMP@@ °C" +"
" +"
" +" Temperature" +"
" +"
" +"
" +"
" +" @@HUM@@ %" +"
" +"
" +" Humidity" +"
" +"
" +#endif + R"=====( @@ -494,7 +514,12 @@ void dashboard() { s.replace("@@ID@@", String(RIG_IDENTIFIER)); s.replace("@@MEMORY@@", String(ESP.getFreeHeap())); s.replace("@@VERSION@@", String(MINER_VER)); - +#ifdef USE_DHT + int temp = dht.readTemperature(); + int hum = dht.readHumidity(); + s.replace("@@TEMP@@", String(temp)); + s.replace("@@HUM@@", String(hum)); +#endif server.send(200, "text/html", s); }