From 2e350ae04333a4daa273c5315a8cba14e8bab950 Mon Sep 17 00:00:00 2001 From: Balthasar Reuter Date: Thu, 4 Jun 2015 15:26:57 +0200 Subject: [PATCH] Added a shutdown button --- photobooth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/photobooth.py b/photobooth.py index 49a0253..bcaffb7 100755 --- a/photobooth.py +++ b/photobooth.py @@ -405,6 +405,7 @@ def setup_gpio(): GPIO.setmode(GPIO.BCM) # Setup the trigger channel as input and listen for events GPIO.setup(gpio_trigger_channel, GPIO.IN, pull_up_down=GPIO.PUD_UP) + GPIO.setup(gpio_shutdown_channel, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.add_event_detect(gpio_trigger_channel, GPIO.RISING, callback=handle_gpio, bouncetime=200) else: print("Warning: RPi.GPIO could not be loaded. GPIO disabled.")