summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@telenet.be>2022-02-27 23:50:47 +0100
committerStijn Buys <ingar@telenet.be>2022-02-27 23:50:47 +0100
commitbe644b94dc95c48608a5614a3de2f02d62321016 (patch)
tree9246aeae26686f2f7d468b73bb71d1f98676021f
parent593ae61b1d4e8ca06bc66d59c19a430e2e966262 (diff)
Print buttond error messages to stderr.HEADmaster
-rw-r--r--buttonctl/buttond.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/buttonctl/buttond.py b/buttonctl/buttond.py
index a49b4e4..661b2f6 100644
--- a/buttonctl/buttond.py
+++ b/buttonctl/buttond.py
@@ -2,15 +2,16 @@
import RPi.GPIO as GPIO
import subprocess
+import sys
-print ('waiting for button presses');
+print ('Watching soft button GPIO26 for button presses...', file=sys.stderr);
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, shutting down')
+print ('Soft button pressed, shutting down...', file=sys.stderr)
subprocess.call(['ledctl', 'boot'], shell=False)