Page 1 of 1

esp32 display analog input in webpage

Posted: Wed Oct 20, 2021 11:39 am
by jancuaucamp
Good day.
Im trying to get an analog input on wroom 32 esp and sent to html webpage.
All the examples I found sent is to app developer and not a webpage.
In the video the person say there is some examples in the wiki,I cant find it .
Does anyone have a example to display a variable to an html webpage

Thanks

Re: esp32 display analog input in webpage

Posted: Wed Oct 20, 2021 2:24 pm
by BenR
Hello,

Here's a quick example that hopefully should help to show you the way.
ESP_Webpage.fcfx
(15.17 KiB) Downloaded 143 times

The outgoing substitution is referenced in the HTML code using the %0 text.

Re: esp32 display analog input in webpage

Posted: Thu Oct 21, 2021 9:49 am
by jancuaucamp
Thanks ,That helped me alot.
Any change of an example how to recieve from webpage ?

Re: esp32 display analog input in webpage

Posted: Thu Oct 21, 2021 12:38 pm
by medelec35
Thanks, Ben.
It works great.
The only downside is the webpage will require refreshing if the ADC changes value.
There is a simple way around this.
To get the webpage to update every 5 seconds for example.
Within HTML Page 1 of Web Server properties add

Code: Select all

<meta http-equiv="refresh" content="5" >
So you will have:

Code: Select all

<html>
<body>
<h1>Flowcode Webserver</h1>
Webpage Created by Flowcode Webserver.<br />
ADC Value = %0.<br />
<a href="page2.htm">Click here for page2.</a>
<meta http-equiv="refresh" content="5" >
</body>
</html>

Re: esp32 display analog input in webpage

Posted: Fri Oct 22, 2021 12:31 pm
by BenR
Hello,

The example here shows how to pass data back in using a standard HTML form.

https://www.flowcode.co.uk/forums/viewt ... f=10&t=634

Or you can do it in a more static way just using say link URLs.

for example this would pass the following in values 0="100", 1="abcd"

<a href="index.htm?0=100&1=abcd" >Test Link</a>

Re: esp32 display analog input in webpage

Posted: Fri Oct 29, 2021 10:22 am
by stefan.erni
Hi to All

Webserver from Flowcode are working fine.
It's possible to read the page (values) on Windows, Android or iOS via Explorer.

What about an additional comand for the App Developper like "GET Value from Flowcode Web-Server"

Then you can also access the web server with the App Developper. Just read the page and extract the analog value.
That would be a nice addition command.
So it would be easy to query values with a time control in the Appdevelopper and to save them very easily in a log file.

And the convenience of the Flowcode web server remains

regards

Stefan