#include #include #include #include #include #include AsyncWebServer server(80); // WiFi settings const char* ssid = "LILiK_WiFi"; //replace with your SSID const char* password = "pippopippo"; //password String hostname = "PyCoffee"; // HTML WEB interface const char index_html[] PROGMEM = R"rawliteral( PyCoffee HTML interface

Ciao! Sono l'ESP8266 che gestisce la PyCoffee!

Clicca qui sotto per aggiornare il firmware, o il secondo link per il sorgente.

⬆️ OTA Firmware_Update ⬆️ ☕Gitea☕

)rawliteral"; void notFound(AsyncWebServerRequest *request) { request->send(404, "text/plain", "Not found"); } // the setup function runs once when you press reset or power the board void setup(void) { WiFi.mode(WIFI_STA); // WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE); WiFi.setHostname(hostname.c_str()); //define hostname WiFi.begin(ssid, password); // Send web page with input fields to client server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) { request->send(200, "text/html", index_html); }); server.onNotFound(notFound); AsyncElegantOTA.begin(&server); // Start ElegantOTA server.begin(); Serial.println("HTTP server started"); } // the loop function runs over and over again forever void loop() { }