Does the ESp32 update as sensor values change or does the browser need to be updated? I put a hair dryer on my ESP32 to see if the temperature would change and it didn’t seem to update unless I updated the browser. Thanks!!
You’re right, 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.