Condition for flashing cyan

Hi,

Does someone know the boolean condition when the Core is flashing cyan (connected to wifi but not connected to the cloud yet)? It’s close to WiFi.ready() && !Spark.connected() but WiFi.ready() goes true for a short time then goes false.

I need this for agreeing to a captive portal. The HTTP code to accept the portal terms is working but I need to know when to run it. I want to do this when the core is flashing cyan for 5 seconds.

Thanks.

1 Like

It may be a combination of these flags… or might be more low level…
https://github.com/spark/firmware/blob/develop/system/system-flags.md

You could also try SYSTEM_MODE(SEMI_AUTOMATIC); and see if that helps make the connection easier:
http://docs.particle.io/photon/firmware/#system-modes-semi-automatic-mode

2 Likes