Shutdown script used by Nanomesher Hackable Pi Switch
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE Initial commit May 9, 2017
README.md Update README.md May 9, 2017
RunShutdownDetect Fix RunShutdownDetect May 9, 2017
ShutdownDetect.py
install.sh
nanomesher_piswitch.service Add install as systemd service shell script Feb 3, 2018

README.md

Nanomesher PiSwitch Shutdown Detect Script

This is the Shutdown Detection script used by Hackable Raspberry Pi Switch

Description

This python script monitors GPIO pin 7 (GPIO04). The pin needs to be setup as pull down. If the pin goes high and remain high for more than 250ms. It will triggers the linux operating system to shutdown

This script is intended to be used by Raspberry Pi but can be easily modified to suit other variances.

Prerequisties

  • Python 2.x or Python 3.x
  • Python GPIO library
sudo apt-get install python-dev python-rpi.gpio