From 88a54148c9be32b09559dc74910f1496b24e3421 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 27 Feb 2022 23:39:24 +0100 Subject: Renamed buttonctld to buttond. --- buttonctl/buttonctl.py | 16 ---------------- buttonctl/buttond.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 buttonctl/buttonctl.py create mode 100644 buttonctl/buttond.py (limited to 'buttonctl') diff --git a/buttonctl/buttonctl.py b/buttonctl/buttonctl.py deleted file mode 100644 index 26878f1..0000000 --- a/buttonctl/buttonctl.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python - -import RPi.GPIO as GPIO -import subprocess - - -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') - -subprocess.call(['ledctl', 'boot'], shell=False) - -subprocess.call(['shutdown', '-h', 'now'], shell=False) - diff --git a/buttonctl/buttond.py b/buttonctl/buttond.py new file mode 100644 index 0000000..26878f1 --- /dev/null +++ b/buttonctl/buttond.py @@ -0,0 +1,16 @@ +#!/usr/bin/python + +import RPi.GPIO as GPIO +import subprocess + + +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') + +subprocess.call(['ledctl', 'boot'], shell=False) + +subprocess.call(['shutdown', '-h', 'now'], shell=False) + -- cgit v1.2.3