Added WiFi.disconnect to ESPNow examples. Fixes https://github.com/espressif/arduino-esp32/issues/1425 (#1511)
This commit is contained in:
parent
33392af315
commit
36c8020cbc
@ -40,6 +40,7 @@ esp_now_peer_info_t slave;
|
||||
|
||||
// Init ESP Now with fallback
|
||||
void InitESPNow() {
|
||||
WiFi.disconnect();
|
||||
if (esp_now_init() == ESP_OK) {
|
||||
Serial.println("ESPNow Init Success");
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
// Init ESP Now with fallback
|
||||
void InitESPNow() {
|
||||
WiFi.disconnect();
|
||||
if (esp_now_init() == ESP_OK) {
|
||||
Serial.println("ESPNow Init Success");
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ int SlaveCnt = 0;
|
||||
|
||||
// Init ESP Now with fallback
|
||||
void InitESPNow() {
|
||||
WiFi.disconnect();
|
||||
if (esp_now_init() == ESP_OK) {
|
||||
Serial.println("ESPNow Init Success");
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
// Init ESP Now with fallback
|
||||
void InitESPNow() {
|
||||
WiFi.disconnect();
|
||||
if (esp_now_init() == ESP_OK) {
|
||||
Serial.println("ESPNow Init Success");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user