How to make Photon booting / running without WiFi with automatic connection to WiFi when available

Hi,

I read some posts about similar problem, but I couldn’t find a working solution.
I have a Photon in environment where WiFi is available only during working hours. My code normally doesn’t need connection to internet or cloud, it just controls some small gadgets and from time to time I read status of ports.
I would like to find a way how to make it running when WiFi is unavailable. And when WiFi is available it automatically connects, when WiFi drops, it still runs.
I read about semi-auto mode, but I am not sure how to check for WiFi availabilty in the loop (without blocking the loop).

Thank you.

Peter

You can use semi automatic but you can also use https://docs.particle.io/reference/firmware/photon/#system-thread SYSTEM_THREAD(ENABLED); so you don’t need to manage it in your own code. The other option would be to define these “working hours” in your program and connect accordingly

Thank you. It seems to be exactly what I need.