diff --git a/IrSendRecv.ino b/IrSendRecv.ino index 457bbf1..76ac62a 100644 --- a/IrSendRecv.ino +++ b/IrSendRecv.ino @@ -1,216 +1,18 @@ #include +#include #include #include const char* ssid = "paradicsom"; const char* password = "19700318"; -String url = "http://192.168.50.69"; +const char* url PROGMEM = "http://192.168.50.69"; +const char* githubFileURL PROGMEM = "https://raw.githubusercontent.com/htamas1210/ArduinoRemoteWeb/master/index.html"; +const String githubToken PROGMEM = "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"; +String gitwebpage = ""; WebServer server(80); -const char webpage[] PROGMEM = R"rawliteral( - - - - - Arduino Remote Web - - - - -
-
Power
-
Exit
-
Guide
-
Mute
-
Source
-
-
-
-
Volume up
-
Volume down
-
-
-
Channel up
-
Channel down
-
-
-
-
-
1
-
2
-
3
-
-
-
4
-
5
-
6
-
-
-
7
-
8
-
9
-
-
-
0
-
-
-
-
0){ + gitwebpage = httpClient.getString(); + Serial.println("File content: "); + Serial.println(gitwebpage); + }else{ + Serial.printf("Error code: %d\n", httpResponse); + } + + httpClient.end(); + ////////////////////////////////////////////////////// IrSender.begin(IR_TRANSMIT_PIN, ENABLE_LED_FEEDBACK, USE_DEFAULT_FEEDBACK_LED_PIN); // Specify send pin and enable feedback LED at default feedback LED pin @@ -266,9 +85,11 @@ void setup() { Serial.print(F("Ready to receive IR signals of protocols: ")); printActiveIRProtocols(&Serial); + ///////////////////////////////////////////////////////// + // Define route for root server.on("/", HTTP_GET, []() { - server.send(200, "text/html", webpage); + server.send(200, "text/html", gitwebpage); }); // Define route for LED toggle