I am still figuring things out with the spark core so forgive me if this has been solved, or there is a way to make this situation work. The closest I have found was “Can I Turn the CC3000 OFF?” located here https://community.spark.io/t/can-i-turn-the-cc3000-off/3233 . What I am looking to do may also be accomplished in code possibly, but I am not sure where to start.
If I 1. lose WiFi, or 2. lose connection to the cloud the core appears to stop processing the code/user loop. Sometimes I get auto-reset (CFOD) and then there is no WiFi available and the core sits. I seem to be able in code to check if I am connected to WiFi and check the connection to the cloud and can program around a no connection scenario. However, when the loop stops and/or resets I can’t program around that.
What I would like if possible…
- User/Code loop executes no matter what, period.
- If WiFi is available, latch on and get an ip address. If not try again later.
- If cloud is available connect to cloud. If not try again later.
- (nice to have, but not a connectivity issue) When a core is being flashed, instead of halting the execution fire off a method “finally” or “done” whatever you want to call it with a timeout. This way I can nicely save off any data to the EEPROM, save my state off with HTTP call, and change the states of the pins (set them low to turn off relays etc.) This would provide a graceful firmware update.
Is there some way to accomplish this? Or any chance these ideas could be incorporated in to the firmware?
Thanks again for everyone’s time.