You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
385 B
22 lines
385 B
|
|
#include <ESP8266WiFi.h> |
|
#include <ESP8266mDNS.h> |
|
#include <ArduinoOTA.h> |
|
#include "secrets.h" |
|
|
|
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(); |
|
}
|
|
|