mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 22:25:39 +00:00
GPIO
This commit is contained in:
@@ -9,8 +9,8 @@ class GPIOManager():
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
GPIO.setmode(GPIO.BCM)
|
GPIO.setmode(GPIO.BCM)
|
||||||
GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
|
GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
|
||||||
GPIO.add_event_detect(23, GPIO.RISING, callback=self.printFunction, bouncetime=300)
|
GPIO.add_event_detect(23, GPIO.RISING, callback=printFunction, bouncetime=300)
|
||||||
|
|
||||||
|
|
||||||
def printFunction(self):
|
def printFunction():
|
||||||
logger.error("Sakatu da")
|
logger.error("Sakatu da")
|
||||||
|
|||||||
Reference in New Issue
Block a user