Do I have to factory reset on every runtime error?

Hello,
When my code has an error, it is not able to sync to the cloud, so I am not able to reload any (fixed) firmware to it. Everytime I test my code I have to keep resetting the spark core to factory settings and reentering my wifi credentials, which is kind of slow and clunky.

I feel like there is a better way to go about this than factory resetting it every time. Am I missing something basic?

What kind of error are you talking about that the core is unable to connect to the :cloud:?

If you have Spark-cli installed, simply place it in DFU mode and reflash tinker will do. :wink:

1 Like

Hello,
Thank you for your response.
So far I have encountered two errors that caused the core to begin flashing the red panic code. One was I was making http requests and forgot to set a delay between each request, and another was something weird happened with sending a UDP packet (looking it up showed something about overwriting the buffer)
I shall install the CLI

Also it seems like anytime I make HTTP requests, the core turns white and it can no longer see the cloud.

The TCP/UDP has some stability issue that awaits fixing and might lead to red sos panic flashing.

If you would like, open up a new thread with a link to your code and see if the community can spot some code to be tweaked :wink:

1 Like

Try placing a 10 second delay in your setup. That should give you enough time to do a OTA update without needing a factory reset. Might help.

2 Likes

I agree with @Moors7 a delay will help you flash and resolved some issues I had. Without that delay I had to always do a factory reset which is not fun if the chip is installed somewhere :smile:

1 Like