• 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

Q&A Forum › Category: ESP32 › ESP32 Web Server
0 Vote Up Vote Down
aage asked 6 years ago

Hi Rui
I make a web page showing how many times a day 6 heating valves open and close. data must be saved per day, week month, that means i have 18 data fields on my webpage.
I use Async Web Server which I have learned in your amazing course but you only show how to update 1 data field. with
String processor (const String & var).
i have attached code that shows how i got it to work with more data fields …but 18 🙁
Maybe you have a better solution
Regards
Aage


(const String& var){
Serial.println(var);
if(var == "D1"){
D1 = "2";
return D1;
}
if(var == "D2"){
D2 = "45";
return D2;
}

return String();
}

 

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

Hello Aage, I think you could use a switch case or something, but you’ll need to do something like data to verify the data fields… 
Thanks for sharing! Regards,
Rui

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

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 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.