Hi,
How do I set the Spark Core to start when it is not in wifi range (outside, for example)? I found this thread:
But the link provide does not work. If I boot the device while it is connected to wifi, the application keeps working even if I go outside the wifi range, but the application won't start if I turn on the core when outside wifi range.
If I set the device to semi automatic mode by adding SYSTEM_MODE(SEMI_AUTOMATIC); , I am guessing that I won’t be able to flash the device, right? So how can I set the device to try and connect once after it is switched on and if it fails it proceeds in SEMI_AUTOMATIC mode?
@kennethlimcp I tried that snippet and the device got stuck into an infinite loop in which it attempts to connect and then runs my code. I could not flash the device and ended up having to apply a factory reset. I am totally new to Spark/Particle (received it today) and do not know of another method to stop the code from running.
Edit:
I must have been doing something wrong. I just tried your code one more time and this time it worked fabulously. Sorry for the false alarm!
This code is kinda stable but the WiFi.connect() blocks for 30+ seconds when there is no valid SSID in the vicinity. Needs some fixing but works great for me