Interrupt Support on the IO Expander

Hi, I’ve been using the IO Expander to capture three lever switches (bumpers on a robot) and five analog infrared sensors. The latter are fine as polled values but the lever switches really need to be managed as interrupts, i.e., if the robot has bumped into something we need to know immediately.

I’ve looked at the example as well as the source for the IO Expander and tried implementing interrupt handling, and have spent a number of hours trying various permutations, but so far I’ve not had any luck. Here’s my latest alteration:

_ioe = io.IOE(i2c_addr=0x18, interrupt_pin=4)

And on top of that I’m polling _ioe.get_interrupt(), which I thought I’d not need to do as this is an interrupt…

I’m not sure if I’m doing something wrong or if it’s just not supported. Is there some way to have an interrupt fire on a digital pin, or on any state change (and then I’d check to see which had changed)? Any example code on how to do that? Adding a working example file to the distribution would be very handy.

Thanks very much for any assistance.