Rename wifi_setup.h to core/wifi_setup.h

This commit is contained in:
Ross 'H3ALY' Healy authored and GitHub committed 2024-10-19 09:25:41 +01:00
1 parent 1856c56799
commit 803fd3c68a
1 file changed
+26
View File
@@ -0,0 +1,26 @@
#ifndef WIFI_SETUP_H
#define WIFI_SETUP_H
#include <ESP8266WiFi.h>
#include "config.h"
class WiFiManager {
public:
void setup_wifi() {
Serial.print("Connecting to ");
Serial.print(ssid); // Use Serial.print instead of Serial.println
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
};
#endif