WLAN is just a global variable, nothing special, so that I can run the WLAN.disconnect() in another function.
Trying to have one WiFi connection function to avoid code duplication for all the functions that will need WiFi.
According to the documentation here: http://www.espruino.com/Reference#l_WLAN_disconnect it says:
function WLAN.disconnect() Completely uninitialise and power down the CC3000. After this you'll have to use require("CC3000").connect() again.
I will try it using the sample code where everything is in one function, disconnect and then connect again and see if I get the same issue.
@user47955 started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
WLAN is just a global variable, nothing special, so that I can run the WLAN.disconnect() in another function.
Trying to have one WiFi connection function to avoid code duplication for all the functions that will need WiFi.
According to the documentation here: http://www.espruino.com/Reference#l_WLAN_disconnect it says:
I will try it using the sample code where everything is in one function, disconnect and then connect again and see if I get the same issue.