Wif Connection of Particle Photon

Particle photon still work if wifi connection is lost?
I test with an led bud.

Fig.1 With Wifi-connection


Fig.2 Without Wifi-connection
and led on board turns to green and find for signal.
Explain me plx.

You need to enable multi-threading for the device to work in offline mode.

This following is the example code:

SYSTEM_THREAD(ENABLED);

void setup() {
...
}

void loop() {
...
}

how to make mutil-threading?
as u mentioned above,…

@yapno Welcome to the Particle Community.

When you post a question about your application it helps if you could in future add a code snippet and which Device OS you are using.

The behaviour of the photon application thread in regard to WiFi and Cloud connection will depend upon whether it has been set to SYSTEM_THREAD(ENABLED); or not and also SYSTEM_MODE();

I would suggest a bit of reading of the reference documents and search of the forum for ‘Wifi’ will help your understanding of how to master this.

It would appear that the application thread is being blocked by the device searching for the WAP it was connected to.

Just put SYSTEM_THREAD(ENABLED); in top of your code. Please check the skeleton of the code I mentioned.

SYSTEM_THREAD(ENABLED);

void setup() {
...
}

void loop() {
...
}

Thx a lot…

Welcome to the community and glad you already got your answer, but may I refer you to this post

Since this is a question asked and answered countless times already, Step 2 of that post may be worth stressing