Shutdown/reboot(/power on) Raspberry Pi with pushbutton
Branch: master
Clone or download
gilyes Merge pull request #1 from fabien-gigante/patch-1
Adding a small debounce delay
Latest commit 9b1e5d2 Nov 2, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit. Jan 1, 2015
README.md Swapped shutdown / reboot criteria. Jan 19, 2015
pishutdown.py

README.md

pi-shutdown

Shutdown/reboot(/power on) Raspberry Pi with pushbutton

Usage:

Connect pushbutton to GPIO pin 5 and ground then run:

sudo python pishutdown.py

When button is pressed for less than 3 seconds, Pi reboots. If pressed for more than 3 seconds it shuts down. While shut down, if button is connected to GPIO pin 5, then pressing the button powers on Pi.