Wireless off on switch

broken image
broken image
broken image

Syntax tmode(mode) -Resume wifi from timed or indefinite sleep WiFi configuration will be retained until changed even if device is turned off. When using the combined Station + AP mode, the same channel will be used for both networks as the radio can only listen on a single channel. Station + AP mode (WIFI_AP_STA), where it both creates its own network while at the same time being joined to another existing network.

broken image
broken image

NodeMCU can run in one of four WiFi modes: Per default, ESP8266 start in STATION_AP mode (as client and access point).Ĭonfigures the WiFi mode to use. You can be a client and/or an access point. WiFi.mode(WIFI_AP) //This line hides the viewing of ESP as wifi network WiFi.forceSleepBegin() //This also works WiFi.mode(WIFI_AP) //To Turn on WiFi in Specific Mode like WIFI_STA or WIFI_AP or using only (WIFI_STA) station mode you can hide ESPs own Access point. In this tutorial we see how to turn off ESP8266 WiFi, There are two methods to turn off wifi first is to use simple ESP8266WiFi.h Library and use WiFi.mode(WIFI_OFF) and another method to use WiFi.forceSleepBegin() By turning wifi off you can save some power.