• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 Web Server – Display Sensor Readings – Does it update readings on it's own?

Q&A Forum › Category: ESP32 › ESP32 Web Server – Display Sensor Readings – Does it update readings on it's own?
0 Vote Up Vote Down
Michael Frick asked 5 years ago

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!!
 

1 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 5 years ago

Hello Michael,

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.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.