Skip to content

Commit d7f6492

Browse files
committed
Update RMakerDevice.ino
1 parent c743f22 commit d7f6492

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libraries/RainMaker/examples/RMakerDevice/RMakerDevice.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//This example demonstrates the ESP RainMaker with the custom device and standard Switch device.
22
#include "RMaker.h"
33
#include "WiFi.h"
4+
#include "WiFiProv.h"
45

56
#define DEFAULT_FAN_SPEED 4
67
#define DEFAULT_POWER_MODE true
@@ -91,9 +92,9 @@ void setup()
9192

9293
WiFi.onEvent(sysProvEvent);
9394
#if CONFIG_IDF_TARGET_ESP32
94-
WiFi.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name);
95+
WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name);
9596
#else
96-
WiFi.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name);
97+
WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name);
9798
#endif
9899

99100
}

0 commit comments

Comments
 (0)