Looking for Information for SYSTEM_MODE Usage?

Can anyone provide me with any kind of help on how to sue this modes?

I am looking for a way to connect to WiFi, but not to cloud… I will handle my networking on my own.

Any clues welcomed!

What you might find useful is to do both. That is what I have done. In essence, just use the Web UI, and add the code as you would dealing with TCP/UDP listening and sending. Just ignore configuring any publishing, Spark variables or the like.

In this way you can have the Spark updatable via the Spark infrastructure, and you have your own infrastructure to do the things that you want to.

The one issue with this is that the RGB LED will by default breathe regardless of if it has connected to your server. I guess the idea would be for the system libraries to be able to be set so that you can configure the ‘Breathe’ colour depending on if you are connected to your local service or not.

Hope this helps… Darryl

AFAIK, the system mode stuff isn’t released yet. At least, it’s not in the docs yet.

That’s how I do it today. But the problem is that if the spark can’t find the cloud… It will not continue running your program :frowning:

#include "spark_disable_wlan.h"
#include "spark_disable_cloud.h"

these lines do what you want… the first one is to disable the WiFi, the second for the cloud.

I use both initially, this lets the core run its setup function and loop function when there is no internet or even wifi.

later in the program you can do WiFi.on() and this will turn the wifi on and connect to a remembered network

you could also do a WiFi.off() to turn it back off again to save power

once the WiFi has connected (WiFi.status() == WIFI_ON) you could call Spark.connect() to turn on the cloud

you can turn the cloud off again by calling Spark.disconnect()

You can see if your connected to the cloud by testing Spark.connected()

Hey Guys,

This feature was recently merged into master I think, but hasn’t been released into the build IDE yet, you can read more about it on the issue page here:

Thanks,
David

This is awesome information!!

Thanks!