Arduino-esp32: How can I turn off the radio on ESP32?

Created on 4 Feb 2018  路  10Comments  路  Source: espressif/arduino-esp32

Hi,
I need, in order to save battery, turn off the radio and the BLE. How can I do that on Arduino IDE?

Most helpful comment

There is an example for this: https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiBlueToothSwitch/WiFiBlueToothSwitch.ino

to turn wifi and Bluetooth off:

WiFi.mode(WIFI_OFF);
btStop();

All 10 comments

Thank you very much!
But that works on Arduino IDE??
I included . How must I call that function?

For wifi you can use:

WiFi.mode( WIFI_MODE_NULL );

should work in Arduino IDE.

Thank you!

With "WiFi.mode( WIFI_MODE_NULL);" The current compsuntion is the same.
I teste with and without that line and I dont see current variation.
Is there another way to turn off the radio part on the ESP32??

I am not sure, the above info came from issue https://github.com/espressif/arduino-esp32/issues/75.

Maybe turn of both radios?
They may be implemented as a single radio that is multiplexed.

There is an example for this: https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiBlueToothSwitch/WiFiBlueToothSwitch.ino

to turn wifi and Bluetooth off:

WiFi.mode(WIFI_OFF);
btStop();

Thank you very much, friends!

Stopping bluetooth with btStop(); will save energy?

Was this page helpful?
0 / 5 - 0 ratings