How can I change code to continually update Temperature and Humidity in the ESP8266 Course instead of only when the Refresh button is pushed ?
1 Answers
Hello, the values aren’t updated automatically. However, there’s an trick that you can use… Add to your HTML web page (inside the <head>…..</head> tags the following):
<meta http-equiv="refresh" content="5" >
For example, in this web server code, you would need to after line 87: https://github.com/RuiSantosdotme/ESP32-Course/blob/master/code/WiFi_Web_Server_Sensor_Readings/WiFi_Web_Server_Sensor_Readings.ino
Something like this:
client.println("<meta http-equiv=\"refresh\" content=\"5\" >");
That will instantly refresh the web page every 5 seconds.