parent
756746523f
commit
389bbe6403
@ -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…
Reference in new issue