From 86b3cc568ba6d579c38fa920cd9da1f3f7d499d4 Mon Sep 17 00:00:00 2001 From: Balthasar Reuter Date: Tue, 19 May 2015 23:27:30 +0200 Subject: [PATCH] gpio routines updated --- photobooth.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/photobooth.py b/photobooth.py index cb04d5d..1b75393 100755 --- a/photobooth.py +++ b/photobooth.py @@ -10,11 +10,7 @@ from sys import exit from time import sleep import pygame - -try: - import RPi.GPIO as GPIO -except RuntimeError: - print("Error importing RPi.GPIO! This is probably because you need superuser privileges.") +import RPi.GPIO as GPIO ##################### ### Configuration ### @@ -250,11 +246,11 @@ def setup_gpio(): def teardown(exit_code=0): display.teardown() - # GPIO.cleanup() + GPIO.cleanup() exit(exit_code) def main(): - # setup_gpio() + setup_gpio() while True: try: display.mainloop(image_idle)