Can a bad program lead to lost Cloud connection?

Hi everyone, my name is Paolo. Fresh Photon owner total Arduino newbie.

I am still in the phase of experimenting with the simplest example.

I have a question for you. The context is an example from Seeed Grove. I get that’s another company and I’m not seeking support for that here, but I’d like understand if it makes sense that any kind of bad code/library can turn the Photon in state “breathing green” that is it cannot connect to the cloud.

To reproduce the problem it’s enough configure and run https://github.com/Seeed-Studio/Grove_Starter_Kit_for_Photon_Demos/tree/master/Example%20-%2003%20Controlling%20the%20RGB%20LED%20with%20G-Sensor that turn accelerometer data into values for an RGB led.

What I see happening, after flashing successfully from the web UI, is that after a short time (less than a minute) of fiddlying with the accelerometer, the led stops reacting and Photon Led turns breathing green.

Can you help to explain what I’m seeing?

thanks

paolo

Yes, you can write code that renders your Photon inable to reach the cloud.

Unless you are using dedicated SYSTEM_MODEs or the new beta multithreading feature SYSTEM_THREAD(ENABLED) any code that prevents your program from leaving loop() while not calling delay() or Particle.process() will most likely break the cloud connection.

But if you’ve got a very fresh Photon and flashed it the first time, it might rather be that the auto firmware update might have come in your way
Read this

Thank you ScruffR, this has been very informative!