Hello world!
I need to show the value of a String on a web-page instead of “ESP32 Login Page” text.
The String variable name is machineName.
The html code:
When the Arduino reads the HTML source code from a file or memory, then it checks for that and then it is replaced by something else. After that the Arduino sends the new HTML code to Ethernet or Wifi.
There are also libraries that do that for you.
Using a escape character and the Arduino fill in that part is a simple and basic solution. There are (too) many ways to make a webserver with an Arduino. For example: in combination with PHP; HTML5 has ‘canvas’ for a graphical live update; AJAX; JSON; and so on.
Have you seen \n or \r or \t in the ‘C’-language ? The escape character is the
The next character tells what it is.
\r is Carriage Return
\n is New Line
\r is Tab