Skip to content

cbrandabur/RPI-Shutdown-Daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPI-Shutdown-Daemon

Simple daemon to monitor a Raspberry PI B/B+ gpio pin and safely shut it down when the button is pressed. This file is part of Casa-Automata http://casa-automata.com

Requires WiringPI: https://projects.drogon.net/raspberry-pi/wiringpi/

Modify the GPIO_IN define to change the pin number to the one you use. By default GPIO 21 is used (pin 40) on B+

To compile it on Raspberry Pi B+:

gcc shutdown_daemon.c -l wiringPi -o shutdown_daemon

To start, stop or see the daemons status:

./shutdown_daemon start|stop|status

Hold the button for at least a second for the Raspberry Pi to start shutting down

B+ Schematic Alt text

The whole setup: Alt text

About

Simple daemon to monitor a Raspberry PI B/B+ gpio pin and safely shut it down when the button is pressed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages