Merge pull request #1 from terokorp/master

Enabling internal pull-up resistor
This commit is contained in:
Zach Levine 2017-07-03 12:35:09 -04:00 committed by GitHub
commit d710c4196c
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import subprocess
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
GPIO.setup(3, GPIO.IN) GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.wait_for_edge(3, GPIO.FALLING) GPIO.wait_for_edge(3, GPIO.FALLING)
subprocess.call(['shutdown', '-h', 'now'], shell=False) subprocess.call(['shutdown', '-h', 'now'], shell=False)