diff --git a/esp32-timed-switch.ino b/esp32-timed-switch.ino
index d5f9339..890e873 100644
--- a/esp32-timed-switch.ino
+++ b/esp32-timed-switch.ino
@@ -13,19 +13,14 @@
// --------------------------------------------
-const char* html_app="
ESP32 timed SwitchScheduler
";
-
-
-// PREFERENCES
+// PREFRENCES
Preferences preferences;
#define RW_MODE false
#define RO_MODE true
// WIFI
-// const char* ssid = "/tmp/lab";
-// const char* password = "bitte2cucung";
-const char* ssid = "Wokwi-GUEST";
-const char* password = "";
+const char* ssid = "/tmp/lab";
+const char* password = "bitte2cucung";
const uint8_t wifi_loop_max = 10;
// NTP
@@ -70,7 +65,7 @@ unsigned int pin_list[2] = {
};
// HTTP
-WiFiClient client;
+WiFiClient http_client;
WiFiServer http_server(3000);
String request;
@@ -193,7 +188,7 @@ void run_scheduler(){
// HTTP
-void deserializeSchedule(WiFiClient &client, int schedule[24]) {
+void deserializeSchedule(String content, int schedule[24]) {
client.readBytes((char*)schedule, 24 * sizeof(int));
}
@@ -274,6 +269,18 @@ void setup(){
}
+void html() {
+ http_client.println("HTTP/1.1 200 OK");
+ http_client.println("Content-Type: text/html");
+ http_client.println("Connection: close");
+ http_client.println();
+
+ http_client.println("");
+ http_client.println("");
+ http_client.println("");
+ http_client.println("