I live in an area with very poor cell service and the current project I’m tinkering with made me realize that as written, the Electron fire’s up, tries to connect to the cell network and drains the battery trying to connect. I would like to change this behavior but not 100% sure how.
Since Particle.connect() blocks execution of the code inside the loop, If possible, I think the right approach is to use an interrupt to break out of the blocking after a given amount of time and execute code to put the electron back to sleep. The docs on attachSystemInterrupt() are thin so I’m unsure if this is even possible.
Any points are very much appreciated.