Green Light Breathing

Hello,

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.

What do I do?

That’s interesting, you know, considering… https://docs.particle.io/guide/getting-started/modes/photon/#factory-reset
Breathing green indicated the following: https://docs.particle.io/guide/getting-started/modes/photon/#cloud-not-connected
Which can be caused by blocking code, and has nothing to do with your credentials or wifi connection.
Safe mode should be able to get you out of this, provided you flash good code, and not the same code again hoping it magically goes away. Could you try Safe mode again, and then try to flash Tinker/Blink An LED?

Alternatively, flash your code in DFU mode over USB, which has a higher success rate.

1 Like

I tried that, it worked once then the second time I flashed again, it went back.
What might be the problem? Code?

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.

2 Likes

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 :wink:

1 Like

I changed my code and now it’s correct.
So how do I go back now? Or will it automatically get around Safe Mode?

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.

1 Like

Go back to what and from where?
If you flashed correct code you should be able to OTA without the need for Safe Mode.

2 Likes

Whenever I reset my Photon, it goes to breathing green again and I have to put it in Safe Mode. After I flash, it works correctly.

Then I’d still suspect your code to be the cause for that, and without seeing the code won’t be convinced otherwise :wink:

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…

1 Like

Okay, its working now. So, I think it was a problem in the code.
Thank you!