This issue seems to be a popular one, I’ve already posted a similar thread on here but i have just uncovered more issues. When starting up my photon sometimes it will start as it should, but its increasingly becoming a problem either after flashing code or manually reseting it. I am still learning how to interface with hardware so i’m constantly flashing new code or manually reseting it. The flash pattern is described in the title, the rapid cyan flashes and short red bursts.
I’ve tried ( from other responses to this issue) in terminal:
particle keys doctor 'id'
particle keys server
in both possible orders
which seem to work for a minute or so when the device restarts but quickly turns to breathing green.I’m unsure what else to try, i just wish it would work. Any help is greatly appreciated!
I don't think this issue is a keys problem as you normally can connect, so I'd suppose your code or external hardware is doing something that interferes with the cloud connection.
Can you show your code?
BTW, if you mention your "parallel" thread, can you provide a link to it too?
e.g. in this thread you never reported back what the outcome of my suggestions was
Thanks ScruffR, sorry for not replying i had to take a break from working on my project and after what you suggested intially worked i forgot to reply back to it.
I was trying to get blynk to work, i.e. push button to control the relay, which the above code does, the device just doesn’t respond 100% of the time. Thanks again
@jjlee32, first, you need to use Particle designations for the pins like D2, D3, etc. For Blynk to work properly, you can’t have any delay() in your code stopping loop() from running. How does Blynk run with all those lines commented out in loop()?
the first line in the loop isnt commented out, Blynk.Run();
I know its probably not the best way to do it but this problem transends any code i have flashed to the device so far.
my device is showing new patterns when it isn’t working. So i just plugged my photon in via USB to my computer and it started up and was breathing cyan and worked for an extended amount of time (30 minutes) then went to breathing green. when i pressed the reset button on the device the original problem reared its ugly head, and every so often it’ll breathe cyan and start the vicious cycle over again.
@jjlee32, something in your code is blocking loop(), causing the Photon to lose the cloud connection (leaving WiFi connected - breathing green). Are you running with SYSTEM_THREAD(ENABLED)?
I am using the browser to flash code to the photon, I don’t know what SYSTEM_THREAD(ENABLED) is, or how to enable it. Is it possible that i could have done it by mistake?
This problem is still haunting me, I am using the same code from above. When the photon get stuck in the rapid cyan flashing cycle i use particle flash --usb tinker which usually works, as it itll breathe cyan and will show online in the web IDE and on the phone app.
However, when i try to flash my code (above) even with the SYSTEM_THREAD(ENABLED)at the very top of the script it will sometimes work, but before or if i have to press the reset button it jumps into the same loop as before.
I’m assuming their is a bug in my code, if someone could let me know what in the code causes the hardware to malfunction it’d be greatly appreciated. Side note; I’m trying to get the blynk app on my phone to switch power and even when the code (above, which has all the blynk lib and statements in it) it still says offline on the app.