No this is good here, but gitter sometimes faster - that's the only reason I mentioned it.
That is a good question. Using wifi.save(), puts you outside of the normal callback approach, but you can assess connected status and do your own if test with wifi.getStatus()?
I have code to refactor now that the ESP8266 port is really quite polished. The above will be my approach. We need the "station" property and will be looking for "connected" as the value.
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.
No this is good here, but gitter sometimes faster - that's the only reason I mentioned it.
That is a good question. Using
wifi.save()
, puts you outside of the normal callback approach, but you can assess connected status and do your own if test withwifi.getStatus()
?http://www.espruino.com/Reference#t_l_Wifi_getStatus
I have code to refactor now that the ESP8266 port is really quite polished. The above will be my approach. We need the "station" property and will be looking for "connected" as the value.