From 17414dddf33270ca1f9a39d32831e187b7935736 Mon Sep 17 00:00:00 2001 From: 9and3r <9and3r@gmail.com> Date: Fri, 8 Aug 2014 11:44:41 +0200 Subject: [PATCH] GPIO more code --- mopidy_touchscreen/gpio_inpput_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mopidy_touchscreen/gpio_inpput_manager.py b/mopidy_touchscreen/gpio_inpput_manager.py index 6a2e3d7..798ef04 100644 --- a/mopidy_touchscreen/gpio_inpput_manager.py +++ b/mopidy_touchscreen/gpio_inpput_manager.py @@ -7,6 +7,8 @@ logger = logging.getLogger(__name__) class GPIOManager(): def __init__(self): + GPIO.setmode(GPIO.BCM) + GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_DOWN) GPIO.add_event_detect(23, GPIO.RISING, callback=self.printFunction, bouncetime=300)