pitrix/wifi.ino
2019-05-21 05:52:57 +02:00

14 lines
349 B
C++

void wifi_setup() {
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.println("WiFi * Connection Failed! Rebooting...");
delay(5000);
ESP.restart();
}
Serial.println("WiFi * Ready");
Serial.print("WiFi * IP address: ");
Serial.println(WiFi.localIP());
}