Any Practical Solutions around Blocking of Particle.connect()?

Hi Folks,

We have a solution where we have an external circuit that is sensitive to not being queried every 10 seconds. We run Semi-Auto mode, but at some point we have to call Particle.Connect(). When we do, we could block for a good bit longer than 10 seconds. With the Electron we can figure on potentially needed to call PArticle.Connect() a good many times over the course of a day, therefore not being able to service the 10 second kick requirement.

Is there some other way of getting around Particle.connect() blocking this essential 10 second check-in?

Thanks!

The best solution is to move your timing-sensitive code outside of loop() and instead handle it from a worker thread. The important part is not making any Particle.* calls, or any calls that access the cellular modem from the timing-sensitive thread, since any of these calls could block while trying to access the cellular modem that is blocked by the Particle.connect.

Great idea. We’ll get right on that! Thanks.