Auto refresh home page

This commit is contained in:
Mathieu Maret 2016-03-17 01:05:19 +01:00
parent c255862617
commit d92fe1ce99

View File

@ -1,5 +1,7 @@
void handleRoot() {
server.send(200, "text/html", "<h1>You are connected</h1><br/>"
server.send(200, "text/html",
"<head><meta http-equiv=\"refresh\" content=\"" + String(SAMPLING_PERIODE_MS / 1000) + "\" ></head>"
"<h1>You are connected</h1><br/>"
"Current temperature " + String(temp, 2) + "C<br/>"
"Current pressure " + String(pressure, 2) + "mB<br/>"
"MQTT Status :" + (MQTT_isConnected() ? "Connected" : "Disconnected") + "<br/>"