14 lines
349 B
C++
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());
|
|
}
|
|
|