From 42a519061d9aa7f076a82f23e0b64e4e35616114 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Thu, 28 Jul 2022 07:47:27 -0500 Subject: [PATCH] Adding deep sleep test sketch --- src/main.cpp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9bcb89e..02ac86c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,32 +1,32 @@ - /* - AsyncElegantOTA Demo Example - This example will work for both ESP8266 & ESP32 microcontrollers. - ----- - Author: Ayush Sharma ( https://github.com/ayushsharma82 ) - - Important Notice: Star the repository on Github if you like the library! :) - Repository Link: https://github.com/ayushsharma82/AsyncElegantOTA +/* + AsyncElegantOTA Demo Example - This example will work for both ESP8266 & ESP32 + microcontrollers. + ----- + Author: Ayush Sharma ( https://github.com/ayushsharma82 ) + + Important Notice: Star the repository on Github if you like the library! :) + Repository Link: https://github.com/ayushsharma82/AsyncElegantOTA */ #include #if defined(ESP8266) - #include - #include +#include +#include #elif defined(ESP32) - #include - #include +#include +#include #endif -#include #include +#include const char* ssid = "JoNelsDarlings"; const char* password = "Paris2016"; AsyncWebServer server(80); - void setup(void) { - Serial.begin(115200); + Serial.begin(9600); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); Serial.println(""); @@ -42,14 +42,13 @@ void setup(void) { Serial.print("IP address: "); Serial.println(WiFi.localIP()); - server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) { + server.on("/", HTTP_GET, [](AsyncWebServerRequest* request) { request->send(200, "text/plain", "Hi! This is a sample response."); }); - AsyncElegantOTA.begin(&server); // Start AsyncElegantOTA + AsyncElegantOTA.begin(&server); // Start AsyncElegantOTA server.begin(); Serial.println("HTTP server started"); } -void loop(void) { -} \ No newline at end of file +void loop(void) {} \ No newline at end of file