Hi Everyone, Just a quick question, is there anyway that in my coding i can call WiFi.off() while my photon is on listening mode and then later if i want to leave an WiFi.off() be able to go back to previous mode which in this case it was in the listening mode?
The reason for this is because I want a user to be able to put his photon offline even if it is in the listening mode and maybe for some reason his photon cannot connect to his router.
I have attached few lines of coding. So far a photon can go from listening mode to offline easily but doesn’t leave the offline mode unless i restart the photon.
if (mbut == UI_SELECT) {
if(WiFi.listening()) {
WiFi.off();
}
else{
WiFi.on();
}
}
Thanks!