The actual solution was found on this thread:
Basically whenever the Pi's connection to the particle cloud was broken, the firmware was reset by particle-agent.
This was fixed by the one and only @jvanier
I changed delay(1000);
to delay(4000);
.
1 Like