Photon: How to run code when no WIFI or Internet


I have noticed that the micro-controller stops running my code, when I turn off the router, or I disconnect the WAN cable from the router.
Also Photon does not seem to start my code until it connected to the internet, which is not really good for me. Is it possible to setup that my code should run always?


Sorry, I have just found the solution!

@atom, you also need to look at SYSTEM_MODE and make sure that if your code expects cloud connectivity, you check Particle.connected() first, for example.

1 Like

@peekay123, great, thanks for the info!