About software Reset button

I am thinking about using code to make tricker reset and listening Mode through an external button by code. I realized that the software reset, which is System.reset( ) will work when the photon is in breathing Cyan. Other than that, the rest mode won’t work with System.reset( ). I wonder if there is anyway to make the System.reset works in any mode?

Mike Lo

Have you tested System.reset() only in SYSTEM_MODE(AUTOMATIC)?

I’d guess so, since in this mode (for the time being) the application code is blocked, till the cloud connection is (re)established.
But in the other two modes application code will keep running (with some additional lag) and so should execute System.reset() just as well.

For AUTOMATIC you’d need some kind of interrupt to force the call to System.reset() to “override” (interrupt ;-)) the connection.

1 Like

That sounds like a good idea, thank you so much.

1 Like