Consider me a newbie. I want my application code to begin to run as soon as power is applied to my device (…either a xenon, boron, or an argon). I do not want the application code to wait until it has communications established with the cloud or network before it begins to execute. I plan to implement the connection to the cloud in automatic mode later on. A few questions regarding the semi_automatic mode:
-
Do I need the following code for the device to connect to the cloud (or network) when I bring D1 to ground through a momentary button or will the device automatically begin to connect to the cloud (or network) as soon as the button is pressed without the code below?
if(connectToCloud && Particle.connected() == false) {
Particle.connect();
connectToCloud = false;
}
void connect() {
connectToCloud = true;
} -
I have pin D1 connected to a sensor for i2c communications. Will the use of a momentary (normally open) push button to ground potentially cause any hardware issues? The reason I ask is that the device may be communicating (i2c) with the sensor when I press the button. Of course it would stop the scl signal momentarily, but that would be ok with me as long as it would not hurt the device.
-
If in semi_automatic mode and if I want to update my application code, I assume I would have to press the D1 button to get the device connected to the cloud (or network) or else load new code through the dfu mode. Will both of these methods work for updating code in semi_automatic mode?
-
Are there any other issues I need to be warned about before I try to use the semi_automatic mode?