mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 22:25:39 +00:00
First support for GPIO on Raspberry Pi
This commit is contained in:
14
mopidy_touchscreen/gpio_inpput_manager.py
Normal file
14
mopidy_touchscreen/gpio_inpput_manager.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import RPi.GPIO as GPIO
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class GPIOManager():
|
||||
|
||||
def __init__(self):
|
||||
GPIO.add_event_detect(23, GPIO.RISING, callback=self.printFunction, bouncetime=300)
|
||||
|
||||
|
||||
def printFunction(self):
|
||||
logger.error("Sakatu da")
|
||||
Reference in New Issue
Block a user