Blocking Particle.connect() and publish()

My understanding from the comments in your other Post was this would best be accomplished with MANUAL Mode :

But you have reasons to not want to modify your code for Manual Mode.

So, If you use an external watchdog, you still have the possibility of the Electron burning through battery for the full length of your timer interval during a Code Crash (1 hour cycle would be too long, especially considering the next connection attempt could fail/lockup).

If you perform 5 min Deep Sleep with an external watchdog as @RWB suggests, the only thing the Electron would do every wake cycle would be to Pet the H/W watchdog, increment a counter, and enter another 5 min Deep Sleep until it's time to publish. That seems realistic without requiring too much modification of your Code and shouldn't take too many milliseconds of precious battery power.

I guess you have to decide what's the power cost of waking at a short interval to kick the external watchdog, verses the power lost during a LONG interval while your Electron is "locked-up". But either way, the external watchdog "should" eliminate the need to manually reset the Electron.

Or Manual & Threaded using (waitFor(Particle.connected, connectionFail) and not have a hardware revision :sunglasses:

3 Likes