Open
Description
Hi,
I would like to enable interrupts on a Adafruit NeoKey 1x4 board. The NeoKey board is connected to a Raspberry Pi, the INT pin of the NeyKey board is connected to pin 16 of the RPI. Is use the following code to register a callback for the interrupts:
GPIO.setmode(GPIO.BCM)
GPIO.setup(INTRRPT_GPIO, GPIO.IN, pull_up_down=GPIO.PUD_UP)
logger.info(f"registering interrupt detection on pin {INTRRPT_GPIO}")
GPIO.add_event_detect(INTRRPT_GPIO, GPIO.FALLING, callback=on_neokey_interrupt, bouncetime=100)
where the function on_neokey_interrupt
just prints some output. This is working fine, if I connect pin 16 to ground.
Using the parameter in the constructor has no effect:
This will only set the field interrupt_enabled since the property is only implemented in Keypad, not in Seesaw.
I tried the following, but also with no success:
neokeys = NeoKey1x4(board.I2C())
for k in range(4):
neokeys.set_GPIO_interrupts(4 + k, True)
Any ideas what the problem could be?