I am running into an issue of the user code being blocked while both the Photon and P1 try to reconnect to the Particle cloud after being dropped. I have read through many discussion threads regarding this issue but had so far no luck finding a definite solution.
My impression with the Photon change log published a while ago seemed to suggest that the new Photon firmware should be able to multi-thread. Does that mean we could run background connection code and user code in parallel? Has this been realized in firmware release 0.4.3, @mdma? (AWESOME release btw!) I didn’t see it in the Github document.
I have tried to use the SparkTimeInterval library but it only seems to work on Core.
@ScruffR, you seem to be the domain expert on this issue. Do you know if there is a clear workaround? I have a routine() in my loop that I would like to execute once every few seconds. It is not possible if the connection to cloud is lost. My current solution is to go completely off-cloud if I detect (!Spark.connected()) by calling Spark.disconnect(). It would be nice to try reconnect to cloud while being able to run the routine code in the loop().
Thanks to everyone in advance for the discussion!