Particle.connect after firmware load instead of before

I would like to avoid the dependency on wifi for the firmware to run. In default mode, the photon tries to connect to the wifi, and only once this is successful does the firmware start up (in my case a greenhouse temp controller).

Is there a way to reverse this behaviour? E.g. on power up the firmware loads and starts looping, and after this it attempts (successfully or not) to connect to the wifi?

Don’t want my plants getting cold when there are wifi issues in our house :).

Have a look at the documentation: https://docs.particle.io/reference/firmware/photon/#system-modes

You may also look into SYSTEM_THREAD(ENABLED)

thanks guys. so if i understood it correctly, the following code will do what i am after:

SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(SEMI_AUTOMATIC);

void setup()
{
    // the system thread isn't busy so these synchronous functions execute quickly

    // insert code here

    Particle.connect();    // <-- now connect to the cloud, which ties up the system thread
}

Thanks!

I’d think it’ll get you there, but if your code will do what you want is beyond us to discern :wink: