WiFi
off()
// EXAMPLE:
Particle.disconnect();
WiFi.off();
WiFi.off()
turns off the Wi-Fi module. Useful for saving power, since most of the power draw of the device is the Wi-Fi module.
You must call Particle.disconnect()
before turning off the Wi-Fi manually, otherwise the cloud connection may turn it back on again.
This should only be used with SYSTEM_MODE(SEMI_AUTOMATIC)
(or MANUAL
) as the cloud connection and Wi-Fi are managed by Device OS in AUTOMATIC
mode.