summaryrefslogtreecommitdiff
path: root/buttonctl/buttond.py
diff options
context:
space:
mode:
Diffstat (limited to 'buttonctl/buttond.py')
-rw-r--r--buttonctl/buttond.py4
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)