from Howchoo / pi-power-button

aprs-rpitx-v4
alanbjohnston 6 years ago committed by GitHub
parent 756746523f
commit 389bbe6403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,12 @@
#!/usr/bin/env python
import RPi.GPIO as GPIO
import subprocess
GPIO.setmode(GPIO.BCM)
#GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_UP)
#GPIO.wait_for_edge(3, GPIO.FALLING)
GPIO.wait_for_edge(26, GPIO.FALLING)
subprocess.call(['shutdown', '-h', 'now'], shell=False)
Loading…
Cancel
Save

Powered by TurnKey Linux.