Does network.WLAN.deinit() turn off WiFi radio part of ESP32 in 1.6.13.b1?
I am trying to figure out if network.WLAN.deinit() turns off WiFi radio part of ESP32 in 1.6.13.b1.
I am using following method for power consumption measurement:
import os from machine import UART uart = UART(0, 115200) os.dupterm(uart)
import pycom from network import WLAN pycom.heartbeat(False) wlan = WLAN() wlan.deinit()
After connecting STK board as power source to Expansion Board 2.0 with LoPy through battery JST connector I observed current spike immediately:
Or after some time:
In case of not calling wlan.deinit() in main.py current spikes appear immediately and are repeating periodically:
It seems that network.WLAN.deinit() makes some difference in power consumption patter. What could be causing those remaining spikes in case WLAN is initialized?
Last sentence should be:
What could be causing those remaining spikes in case WLAN is NOT initialized?