We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce4ea6d commit 1223defCopy full SHA for 1223def
1 file changed
src/WifiConnection.h
@@ -1,19 +1,16 @@
1
#pragma once
2
3
#include <WiFi.h>
4
-#include <WiFiMulti.h>
5
6
-namespace WifiConnection {
7
- WiFiMulti wifiMulti;
8
-
+namespace WifiConnection {
9
// Sets wifi mode to STA and tries to connect to a network
10
void tryConnect(String ssid, String pass) {
11
WiFi.mode(WIFI_STA);
12
- wifiMulti.addAP(ssid.c_str(), pass.c_str());
+ WiFi.begin(ssid.c_str(), pass.c_str());
13
}
14
15
// Method for checking if currently connected to wifi
16
boolean isConnected() {
17
- return wifiMulti.run() == WL_CONNECTED;
+ return WiFi.status() == WL_CONNECTED;
18
19
};
0 commit comments