Electron in "Connected" state is actually dead

Firstly I do not know what is the point of reset the system each cycle?
If you use yours SIM card should reduce ping times from 23 minutes to 120 seconds or for some providers should be reduced the ping to 45-60 sec.

Particle.keepAlive(45);
https://docs.particle.io/reference/firmware/electron/#particle-keepalive-

If you want you can incorporate into your code and Application Watchdog.
https://docs.particle.io/reference/firmware/electron/#application-watchdog

On the following links you have two wonderful tutorials from @rickkas7.

1 Like