ESP32 MicroWebSrv Ajax
Step 1: Why? The Purpose.
Transfer data between Web Page and Python Server.
Python Server to Web Page: To display the sensor reading and saved configuration data on web page.
Step 2: How? The Process.
Display the data of a text file saved in ESP32, to a web page.
Automatically update the web page by sensor readings acquired in ESP32.
On user command, read the content of another web page and display it our web page.
Step 3: What? The Result.
Verify "What we Get" by "Why we are Doing".
- Display the data of a text file saved in ESP32, to a web page.
Edit the files, save and close.
File Structure:
/pyboard
testPY.py
/pyboard/www
testHTML.html
testCSS.css
testJS.js
testTXT.txt
Very Import: Clear the browser data to show the new content.
Check the new developments:
2. Automatically update the web page by sensor readings acquired in ESP32.
Edit the files, save and close.
File Structure:
/pyboard
testPY.py
/pyboard/www
testHTML.html
testJS.js
Very Import: Clear the browser data to show the new content.
Can also verify the loading of new edited html page by developer tools.
Check the new developments:
3. On user command, read the content of another web page and display it our web page.
Edit the files, save and close.
File Structure:
/pyboard
testPY.py
/pyboard/www
testHTML.html
testJS.js
Very Import: Clear the browser data to show the new content.
Check the new developments:
Knowledge Base:
for help regarding html, js, css; checkout w3schools.
for beautiful web page styles; checkout Bootstrap.
for more Java Script functionalities; checkout jQuery.