I have been working with two of my photons since a month and till yesterday everything was going good. But yesterday I flashed some program and one of my photon started breathing Green. So I tried it with my second one too. Even the second one started breathing green.
I have reset the boards, setup wifi repeadtedly. Even did a factory reset, still both of them are not working. I tried going via the Safe Mode but I am not able to send a new code via that.
Flashing Tinker worked, flashing your own code went back to breathing green?
If so, then yes, it's your code. Generally, breathing green is your code blocking the cloud connection, so make sure you aren't stalling too long or be sure to call Particle.process() often enough when you do block the loop for longer periods.
Nope, i flashed my own code but commented out lot of parts.
I think I found the mistake.
Now, how do I take my Photon back to the original state? Because when I reset the Photon, it still breathes green. I have to take it to the Safe Mode and only then I am able to flash.
That's the way you need to do it if your code prevents a successful OTA update by being uncooperative (starving the cloud tasks of µC time).
To get around the need for Safe Mode you need to make your code more cooperative.
A cheap escape is SYSTEM_THREAD(ENABLED) but that should not allow for poor code design
Get back to what? If you flash proper code in Safe mode, it will update and go back to breathing cyan. If your code still malfunctions, you'll end up in breathing green again.
The green light is your friend…that means your code is still trying to run…its the red flashing one that is worse…and then from there we enter the dimness and finally the total darknesss. and it is always good when the chips stay on the carrier…I have blown the regulators off the back of a few nanos. not pretty…I feel safer with this board because its only 3.3V and there’s nothin on the back HAR! And I have learned the benefit of a poly fuse…
The LED sketch is my soft “FACTORY” reset. I love this board because I can load it from a safe distance…