Photon Not Using Wifi Connection

I just the Photon and the Neopixel ring designed to fit with it. I have three of them. I have soldered the Photons and the boards and I was initially able to setup the wifi and flash codes easily. Now, however, the Photons constantly breathe green. I can watch them breathe green, then flash cyan and start breathing cyan for about a minute, until it goes back to green. The console shows them going online for a while, then offline. The cyan breathing period is not even long enough to flash a code. If I hit reset it will do the same, connect and breathe cyan for a minute, then go back to breathing green. They have been using the same wifi network and in the same physical location for the past few days. I have gone through the app and web to setup the devices a few times now.

Do I just have a bad wifi setup or is there something I can do to keep the connection?

Try uploading one of the demo apps if you can get it to connect long enough. Or use CLI to upload it.
Let that run for while to ensure its not something in your code messing with it.


particle device doctor

in CLI a try

Thanks. I flashed Tinker using CLI and they worked fine! So it’s the code. I am using the code from this Hackster project:

Great that it worked.
This project is an advanced project: if you are interested in beginner information, I recommend mine projects for review.

Thanks for the projects link! Yes I’m way over my head with this one.

The issue you are seeing is most likely due to the code blocking somewhere for several seconds.
One workaround is adding SYSTEM_THREAD(ENABLED) to the top of the project. But that doesn’t solve the underlying issue.

Another thing is that this project uses some deprecated syntax (e.g. Spark.variable(name, var, type)) which should be updated to the more recent version (e.g. Particle.variable(name, var))

Furthermore there is always Safe Mode (breathing magenta) to enable OTA updates when the application code prevents it for some reason or other.