gpio_inpput_manager.py 282 B

1234567891011121314
  1. import RPi.GPIO as GPIO
  2. import logging
  3. logger = logging.getLogger(__name__)
  4. class GPIOManager():
  5. def __init__(self):
  6. GPIO.add_event_detect(23, GPIO.RISING, callback=self.printFunction, bouncetime=300)
  7. def printFunction(self):
  8. logger.error("Sakatu da")