Hello,
I’ve read as many of the prior posts on these boards as I can find, and I know that Photon Firmware 0.4.4 was recently released with a fix. I have been running my Photons with this firmware since day 1 - last Thursday, Aug 27 - and I am still having issues with I2C reliability over time.
I’ll provide an example.
I have a SparkFun Photon Weather Shield, and a SparkFun Photon Battery Shield powered by a 2000mAh Li-Po battery and a solar panel through a soldered-on barrel jack. The I2C pull-up resistors on the battery shield are disabled since both shields have them.
I used a slightly tweaked version of the code provided by SparkFun’s Hookup Guide for the weather shield – tweaks are mainly limited to adjustments for the wind vane sensor resistances, reading I2C for the battery fuel gauge, adding Spark variables, et cetera.
At first, I had my battery fuel gauge readings happening every loop, without delay (not that I needed to). I could get away with this for about 30 minutes before everything on the I2C bus went wacky. This is understandable; I was basically hammering it…
Once I realized the error of my ways, I moved the read to happen every second along with the rest of the sensors. This drastically increased the amount of time I could retrieve valid values – it’s been about 2 and a half days. This morning I woke up to more invalid readings.
Is there something that is still causing this? All of the various sensors are being read sequentially on every loop - should the reads be spaced by a delay?
I notice that the process of reading the Spark variables takes considerably longer in this “wacky” state; whether it’s from the processor being maxed out, or a block/timeout being hit somewhere, I do not know.
The only way I have figured out to resolve this issue remotely (as I plan to put this on my rooftop eventually…) is to re-flash the application code from Particle Dev.
If there is any way I can help, I am willing.