/* * ESP32 AJAX Demo * Updates and Gets data from webpage without page refresh * https://circuits4you.com */ #include #include #include #include "index.h" //Web page header file WebServer server(80); //Enter your SSID and PASSWORD const char* ssid = "your network"; const char* password = "your password"; int capPins[] = {4,12,27,33}; float readings = 7.0; int maxcapacitance = 20; // currently not being used //=============================================================== // This routine is executed when you open its IP in browser //=============================================================== void handleRoot() { String s = MAIN_page; //Read HTML contents server.send(200, "text/html", s); //Send web page } void hold0() { int sum = 0; for(int i = 0; i