SOS On Photon - SOS Message, Assertion Failure

Hello All;

I have recentally started adding code to an existing program for a LED Matrix I am making. I adjusted a few things on the code, but then when trying to toggle the WiFi searching on the Photon (I needed to flash some new code) the Photon displayed an error message: the SOS, then 10 red blinks, then SOS. I looked on the help page, and it said that the problem is “Assertion Failure”. I could not find a fix, and am asking for help. Whenever I power on the Photon, it stays offline, as per the code I have for the WiFi switch. However, whenevert I toggle the switch, the Photon displays the SOS, and powers off soon after. I have tried restarting the switch several times, and there is no change. The code will be linked below, and the only thing that I altered before the SOS was a bit of code on line 17, which is explained on the same line.

Thank you for your help!

I also just tried to compile as well, and it said that it could not compile. Is there a limit to how much code I can have?
Link to code

I’m afraid you can’t share code like that, you’ll have to copy-paste it.

1 Like

It’s a lot of code, would it be better to put it into a GitHub? Also, when I tried to verify the code after I got the SOS error, it said for me to check my code, but I did not get an error message saying what was wrong…

Here is a link to the code - https://docs.google.com/document/d/1CS5JMxVz4nJ8QYl5yPFk5sXyDvys9YJ4J3JcZrij3Y8/pub

What do you think the problem is?

Well first of all your functions were not declared in the correct order, but the preprocesssor deals with that.

Your code compiles fine for me.

What version of the system firmware are you using?

6.0, I think. Do you have any idea what caused the SOS?

I'm afraid I can't tell without further investigation.

Ok, thank you!!

Now, for some reason, I can’t connect the photon to the Internet at all… When I tried, it flashed green as usual, but then started breathing green. I tried doing the connection a few times, with no change. However, at one time, I did get the SOS message and 10 blips. As I type this, I had the photon on and not registering to the Internet, just breathing white, and it just started the SOS message again. What do I do?!

Can you put the Photon in safe mode?

1 Like

After I do that, then what do I do??

Try building your code for 0.6.1 and flashing it to your photon.

Also, you should try using SYSTEM_THREAD(ENABLED);.

1 Like

And I do this when the photon is in safe mode?

Yes. Safe mode lets your photon get online without running your code. Once you flash your code your photon will exit safe mode and run your code.

1 Like

Ok, thanks. I will try this and get back to you!!

One last question for you, if the Photon is in safe mode, can I re-register and connect it to the internet?

No need to re-register, it still has the credentials :slight_smile:

1 Like

Thank you all very much, I will see how this works!!

1 Like