I am mikek's Blog

The personal blog of Mike Karthauser, who you may know from Brightstorm Limited or the internet.

Raspberry Pi power button

My friend Tom was bemoaning the lack of power button on the Raspberry Pi. The Pi just comes with a power socket and no switches. The design being that you shutdown in software and deal with power by pulling the wire.

The problem comes when you aren’t near a terminal. I use prompt by Panic on iOS for SSH which means I can issue the shutdown -h now to shutdown fairly easily, but to shutdown otherwise is trouble.
The trick is to connect a push button trigger switch to the gpio. You’d then need to listen for the voltage change and trigger a shutdown command as superuser. The following list describes in much more detail then I can

Once shutdown you can then switch the power using an inline switch http://blog.sheasilverman.com/2012/07/raspberry-pi-onoff-switch-cable/ or just use a mains extension with a power switch


Filed under: raspberry pi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

mikek on twitter

%d bloggers like this: