Web Interface print DHT info

This commit is contained in:
Mathieu Maret 2016-04-07 15:45:55 +02:00
parent bdbcfd25d4
commit 4536163cfd
1 changed files with 6 additions and 2 deletions

View File

@ -5,13 +5,17 @@ void WebHandleRoot() {
server.send(200, "text/html",
"<head><meta http-equiv=\"refresh\" content=\"" + String(CONFIG_SAMPLING_PERIODE_MS / 1000) + "\" ></head>"
"<h1>You are connected to " + String(hostName) + "</h1>"
#ifdef CONFIG_ENABLE_BMP180
"<fieldset>"
"<legend>Sensors</legend>"
#ifdef CONFIG_ENABLE_BMP180
"Temperature " + String(temp, 2) + "C<br/>"
"Pressure " + String(pressure, 2) + "mB<br/>"
"</fieldset>"
#endif
#ifdef CONFIG_ENABLE_DHT
"Temperature DHT " + String(dhtTemp, 0) + "C<br/>"
"Humidity DHT " + String(dhtHumidity, 0) + "%<br/>"
#endif
"</fieldset>"
#ifdef CONFIG_WEB_CONTROLLED_GPIO
"<fieldset>"
"<legend>Relay</legend>"