Merge pull request #1 from terokorp/master
Enabling internal pull-up resistor
This commit is contained in:
commit
d710c4196c
|
@ -6,7 +6,7 @@ import subprocess
|
|||
|
||||
|
||||
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)
|
||||
|
||||
subprocess.call(['shutdown', '-h', 'now'], shell=False)
|
||||
|
|
Loading…
Reference in New Issue