Restart the Core

Hello, Is there a way to implement on the code when the spark comes back from a Spark.sleep(SLEEP_MODE_DEEP, );
If It doesn’t connect to a wireless network, restart the core again to see if connect to a wireless network again? I have notice that sometimes after waking up the green light start to blink for a while until I press the reset button it connects again.
Thanks…

There are several things you could do to deal with this issue.

But not to rob you the joy of finding out yourself, please have a quick browse through the firmware docs
http://docs.particle.io/core/firmware/

The left nav bar is the quickest way to stumble over keywords that might fit.
Have a look for reset, connect, on/off, System modes, …

1 Like

Thank You for your reply, I notice when the core turns on and the goes to flashing green it doesn’t go to the void setup() and the void loop(). So if thats the case how can I implement a code to restart if it doesn’t pass?
Thank You,

That’s where the system modes come in. They’ll allow you to configure what happens when your Core boots. Do have a look at the suggested docs, it’s all there :wink:

2 Likes

Thank You for the help. I got it working!
Yay… :smiley:

1 Like