Base project for building webservers on the ESP32. Uses ESP Async WebServer and ArduinoJson.
Create your secrets.h file, and add it to the include folder.
#define SSID "YOUR SSID"
#define PASS "YOUR PASS"
Edit the cpp code in main.cpp and the html files in html. Any updates or new html / css / js files will be automatically included whenever you run move_html.py.
Build and upload to the ESP32 with PlatformIO.
Visit the IP address printed by the Serial Monitor to view and interact with the webpage.
- Rendering multiple pages with external css and preprocessing
- Send and recieve json updates
- Handle asynchronous IO requests
In order to improve the HTML Preprocessor, this project replaces the default character of '%' with the much less used '~'. This is set in the build flags.
build_flags =
${env.build_flags}
-D"TEMPLATE_PLACEHOLDER=(char)126"