I have an application where I’m just trying to hit a MQTT broker on the local LAN. I only need the Spark cloud when I want to reprogram, which I can do via a button on the device. So, I want the Photon to connect to the wireless AP, because that’s where the broker is. But I don’t want it to connect to the cloud unless I press the button. Alternatively, it can connect to the Spark cloud if it wants or is able to, but don’t prevent my user application from running just because the Spark cloud can’t be reached. However, do prevent it from running until the wifi connection is established.
I read the system mode explanation, but still have questions.
In semi and full manual mode, the “Spark.connect()” command seems to tell the Core/Photon to do two things:
- connect to wireless AP
- connect to Spark cloud
Spark.connect() doesn’t seem to differentiate between “connect to wireless AP” and “connect to Spark Cloud”?
If the Spark.connect call never reaches the Spark cloud, the microcontroller hangs at the routine, right? Is there a separate Wireless.connect() and a Spark.connect(), where Wireless.connect() only connects to the wireless AP and not try to reach the Cloud?