Hello Pi community!
Anyone who has had their OS freeze up on them knows the woes of cutting the power or grounding the run header. I recently started using a SSH to safely reboot the pi, even when frozen, and it got me thinking. Would it be possible to setup a peripheral circuit that uses the GPIO header interfaced with a controller to create a safe hard-reset button?
More specifically, can I setup the pi to mimic a SSH command (sudo reboot) when a physical button is pushed that is connected to a GPIO?
I figure that in the most complicated arrangement, I could use another raspberry pi (slave) that does nothing else but open a SSH with the main pi (master), and waits for a GPIO condition that will cause it to execute the reboot command to the master over the SSH.
Obviously I would prefer to not use an entire pi for this, and instead I would like to use a simple micro-controller circuit. Furthermore, it would be really cool if I could do it without an internet connection.
I am still very new to programming the pi, but I have a very extensive background in electronics. If anyone has any useful input or links to aid me in this venture then please feel free to share. I will try to develop this as described above, but I would love some help on simplifying it.
If we can come up with a simple and cheap circuit, then it can be added to any pi to make a safe way to force a reboot!