Skip to content

RobertJN64/ESP_Webserver_Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

Base project for building webservers on the ESP32.

Resources

License

Stars

Watchers

Forks