diff options
| author | Stijn Buys <ingar@telenet.be> | 2022-02-27 23:42:04 +0100 |
|---|---|---|
| committer | Stijn Buys <ingar@telenet.be> | 2022-02-27 23:42:04 +0100 |
| commit | e6ef9ed4a3129da1e449f4f4f5e0d7719b8b04c5 (patch) | |
| tree | 2ed4fe3d524ceeb32b93d3405741a989831a5007 /buttonctl/buttond.py | |
| parent | d368910ee1403ead0ffaa97d0b67a5ae84cd148c (diff) | |
Run systemctl daemon-reload at the end of make install.
Diffstat (limited to 'buttonctl/buttond.py')
| -rw-r--r-- | buttonctl/buttond.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/buttonctl/buttond.py b/buttonctl/buttond.py index 26878f1..a49b4e4 100644 --- a/buttonctl/buttond.py +++ b/buttonctl/buttond.py @@ -4,11 +4,13 @@ import RPi.GPIO as GPIO import subprocess +print ('waiting for button presses'); + GPIO.setmode(GPIO.BCM) GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.wait_for_edge(26, GPIO.FALLING) -print ('button pressed') +print ('button pressed, shutting down') subprocess.call(['ledctl', 'boot'], shell=False) |
