show image0 button

This commit is contained in:
2026-01-26 11:45:11 +01:00
parent 665c68e041
commit 81026eae48
3 changed files with 54 additions and 27 deletions
+32
View File
@@ -0,0 +1,32 @@
const char* ssid = "PPIA";
const char* password = "pawelpdaldonejta";
WebServer server(80);
void handleRoot() {
server.send(200, "text/html", index_html);
}
void handleShow() {
pixels.show();
drawImageFromArr(0, 0, 0);
server.send(200, "text/plain", "OK");
}
void start_server() {
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
Serial.println(WiFi.localIP());
server.on("/", handleRoot);
server.on("/show", handleShow);
server.begin();
}
void handle_server() {
server.handleClient();
}