Currently we poll the I/O expander pins for state changes of the input buttons.
The I/O port expander (MCP23017) can issue interrupts on two pins whenever one of all the input pins changes (see datasheet page 24).
We should catch these interrupts in order to save cpu cycles for other things and in order to guarantee that we don't miss any button press.
However, this means we have to modify the current hardware (connect INTA and/or INTB of each I/O expander to the arduino) and the software.
Currently we poll the I/O expander pins for state changes of the input buttons.
The I/O port expander (MCP23017) can issue interrupts on two pins whenever one of all the input pins changes (see datasheet page 24).
We should catch these interrupts in order to save cpu cycles for other things and in order to guarantee that we don't miss any button press.
However, this means we have to modify the current hardware (connect
INTAand/orINTBof each I/O expander to the arduino) and the software.