Event listener on MCP23017 without interrupt GPIOs #91
-
Is it possible to use event listener on DigitalInputDevice built with MCP2317 as a DeviceFactory? I create input device like this: DigitalInputDevice inputDevice = DigitalInputDevice.Builder
.builder(1)
.setDeviceFactory(new MCP23017(I2CConstants.CONTROLLER_0, 0x20, INTERRUPT_GPIO_NOT_SET, INTERRUPT_GPIO_NOT_SET))
.setPullUpDown(GpioPullUpDown.PULL_UP)
.build() then I am able to read input device state correctly with inputDevice.addListener((event) -> LOGGER.info("Input device state changed")) I am guessing it has something to do with no interrupt GPIOs. However, my hardware doesn't have any of INTA nor INTB connected. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You are correct - events can only be triggered by diozero if INTA or INTB are connected and configured, diozero avoids polling for event notification. |
Beta Was this translation helpful? Give feedback.
You are correct - events can only be triggered by diozero if INTA or INTB are connected and configured, diozero avoids polling for event notification.