Files
Scanning the repository...
Last update 5 years 9 months
by Afonso Muralha
| FilesCODEESP | |
|---|---|
| .. | |
| .vscode | |
| data | |
| ESP.ino | |
| ESPAsyncWebServer.h |
ESP.ino#include <AsyncEventSource.h> #include <AsyncJson.h> #include <AsyncWebSocket.h> #include <ESPAsyncWebServer.h> #include <SPIFFSEditor.h> #include <StringArray.h> #include <WebAuthentication.h> #include <WebHandlerImpl.h> #include <WebResponseImpl.h> #include <SPIFFS.h> #include <WiFi.h> #include <WiFiClient.h> #include <WiFiServer.h> #include <WiFiUdp.h> //#include <AsyncWebSocket.h> const char* ssid = "ESP"; const char* password = "1234567890"; AsyncWebServer server(80); void setup(){ Serial.begin(115200); if(!SPIFFS.begin()){ Serial.println("An Error has occurred while mounting SPIFFS"); return; } WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(1000); Serial.println("Connecting to WiFi.."); } Serial.println(WiFi.localIP()); server.on("/html", HTTP_GET, [](AsyncWebServerRequest *request){ request->send(SPIFFS, "/index.html", "text/html"); }); server.begin(); } void loop(){}