Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.06 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.06 KB

ESP Webserver Template

Base project for building webservers on the ESP32. Uses ESP Async WebServer and ArduinoJson.

Setup

Create your secrets.h file, and add it to the include folder.

#define SSID "YOUR SSID"
#define PASS "YOUR PASS"

Use

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.

Demos

  • Rendering multiple pages with external css and preprocessing
  • Send and recieve json updates
  • Handle asynchronous IO requests

HTML Preprocessor

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"