• 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

How to change code to continually update Temperature and Humidity ?

Q&A Forum › Category: ESP8266 › How to change code to continually update Temperature and Humidity ?
0 Vote Up Vote Down
4John316 asked 6 years ago

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
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

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.

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] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

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

Copyright © 2013-2025 · 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.