From 2a7f9288ad31108854e599875679d00b1590a1e0 Mon Sep 17 00:00:00 2001 From: ephides <42291336+ephides@users.noreply.github.com> Date: Tue, 1 Dec 2020 21:22:34 +0100 Subject: [PATCH] Initial OTA version --- ESPClock.ino | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ESPClock.ino diff --git a/ESPClock.ino b/ESPClock.ino new file mode 100644 index 0000000..e486267 --- /dev/null +++ b/ESPClock.ino @@ -0,0 +1,25 @@ +#include +#include +#include + +#ifndef STASSID +#define STASSID "PBS-6C0855" +#define STAPSK "GtYpvyXv0uLQT" +#endif + +const char* ssid = STASSID; +const char* password = STAPSK; + +void setup() { + WiFi.mode(WIFI_STA); + WiFi.begin(ssid, password); + while (WiFi.waitForConnectResult() != WL_CONNECTED) { + delay(5000); + ESP.restart(); + } + ArduinoOTA.begin(); +} + +void loop() { + ArduinoOTA.handle(); +}