Skip to content

This is a simple Python Code for Raspberry Pi which allows User to "Shutdown" and "Reboot" their Pi using a physical button.

Notifications You must be signed in to change notification settings

Arduino3128/PiButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PiButton

This is a simple Python Code for Raspberry Pi which allows User to "Shutdown" and "Reboot" their Pi using a physical button.
Installation process:
1.Move the PiButton.py to /usr/local/bin/
mv PiButton.py /usr/local/bin/
2.Move the PiButton.sh to /etc/init.d/
mv PiButton.sh /etc/init.d/
3.Add the following line to the /etc/rc.local to run the code at Boot.
sudo /etc/init.d/PiButton.sh start

Button Connection:

Connect a Button between GPIO Pin 17 and Ground.

Usage:

Pressing and holding the button for 3 Seconds reboots Raspberry Pi.
Short press shutdowns Raspberry Pi after 3 Seconds.

About

This is a simple Python Code for Raspberry Pi which allows User to "Shutdown" and "Reboot" their Pi using a physical button.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published