Hi,
According to article, in order to get more rapid calls to loop() I need to disconnect from Cloud. I see Particle.disconnect() states “If you disconnect from the Cloud, you will NOT BE ABLE to flash new firmware over the air. A factory reset should resolve the issue.
( https://docs.particle.io/reference/firmware/photon/#particle-disconnect- )”.
Will I be able to refresh my application code (for changes) from web IDE to the Particle device via Wifi if I install an app that calls Particle.disconnect()? Part of my question is confusion between the device firmware, e.g. 0.5.2, and my application firmware. Are both not updatable after this call?
I still want to use the Web IDE for updating (it works!), but need high processing rates in loop(). I do need Wifi to remain enabled in order to stream received data to a remote client.
Ed
If you are disconnected from the cloud you won’t be able to update OTA.
But you can add some way to reconnect to the cloud (e.g. via a button press) or
you could use Safe Mode to stop your code from running and hence disconnecting the cloud.
Sure thing, if you can’t OTA your application firmware the system firmware can’t be updated either, but updating system would only happen once in a while usually triggered by you directly or indirectly by flashing code for a newer system version, which in turn would force the device into Safe Mode reenabling the OTA system update.
Another way to speed up your own app (but not that significantly as disconnecting) might be SYSTEM_THREAD(ENABLED)
as it “evens out” the impact of the cloud keeping rather than blocking it all between iterations of loop()
.
Or you go for SYSTEM_MODE(MANUAL)
where you decide when and how often cloudkeeping should happen via Particle.process()
1 Like
Great ideas.
The short term I may just use the button press solution. Medium term, since the device is Wifi connected, I could send a command from the remote client.
Thank you very much for support.