Best way to trigger / schedule a reset from user code?

Continuing the discussion from Can the Spark Core trigger the Reset Pin?:

I’ve read much of this lengthy thread but there are references to things changing over releases expected over coming months, and the thread is now several months old. Therefore, I am unsure as to the current state of the problem-solution. What is the best way to trigger a Reset from user code? A quick summary would likely be useful for others too. Anybody?

System.reset() is what you are looking for though i have no idea why is not in the docs :smiley:

I’ve done all I can to rectify that.

I’m not sure what this even means.

You asked a question and i provided the answer.

Thank you for the answer. I have updated the docs as best I can. Which is not very well at all, as I know nothing about this function, and I am not about to start reading the underlying code. That the documentation is incomplete is a REAL problem but it certainly keeps the forum alive, and that’s why we bought our Sparks, right? :-/ I’ve just spent half an hour reading the forum because System.reset() is not documented. So frustrating.

This has been added to docs: https://github.com/spark/docs/commit/a27921a8ad53a1ae894fa1554327a191d21a94af

Thanks!

That’s what I meant when I said I had done all I could to rectify the lack of documentation. Fortunately someone else has improved the contribution and added an example.