We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4aafeb8 commit 3dab9d1Copy full SHA for 3dab9d1
src/main.cpp
@@ -106,6 +106,10 @@ void connectToWiFi(String init_str)
106
{
107
Serial.print(init_str);
108
109
+ WiFi.hostname(THINGNAME);
110
+ WiFi.mode(WIFI_STA);
111
+ WiFi.begin(ssid, pass);
112
+
113
while (WiFi.status() != WL_CONNECTED) {
114
Serial.print(".");
115
delay(1000);
@@ -177,10 +181,6 @@ void setup()
177
181
UnoBoard.begin(9600); // your esp's baud rate might be different
178
182
delay(5000);
179
183
180
- WiFi.hostname(THINGNAME);
- WiFi.mode(WIFI_STA);
- WiFi.begin(ssid, pass);
-
184
connectToWiFi(String("Attempting to connect to SSID: ") + String(ssid));
185
186
NTPConnect();
0 commit comments