Hi,
I need, in order to save battery, turn off the radio and the BLE. How can I do that on Arduino IDE?
I turn off BLE with btStop()
https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-bt.c
Thank you very much!
But that works on Arduino IDE??
I included
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?
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: