Does Particle.process() use data on an Electron? I have a blocking loop that repeatedly measures a sensor for about 0.25s, once per ms, and I use Particle.process() inside the loop in my Photon code. I didn’t think I needed Particle.process() on Electron (I could be wrong), since Electron checks in with the cloud less frequently (my understanding). However, I am getting some spurious sensor readings on the Electron, and I’m wondering if is due to not using Particle.process(). My main concern is that if I call Particle.process() hundreds of time every time I take a sensor reading, and it uses data, I may be using a significant amount of data here. Is this the case? Can someone clear up my uncertainties?
Nope.
It only makes sure that any change between device and cloud will be dealt with. If your code doesn't cause any change that needs to be synced to the cloud and the cloud has no change for your device to announce Particle.process()
in itself won't cause any traffic.
If you loop()
is regularly falling through Particle.process()
isn't needed since it's implicitly called between iterations of loop()
anyway.
1 Like