MCP23017 and 74HC4051 libraries Posted on February 14, 2013
I wrote my first libraries for handling all inputs. The INPUT_MCP23017 library is for reading all digital inputs of a MCP23017 port expander via I2C. The INPUT_74HC4051 library is for reading all analog inputs of a 74HC4051 multiplexer through one analog pin, controlled by three digital pins.
Both read the values into an array in the loop() function and call a callback funtion if a value of an input has changed. For my application, this means, a MIDI signal is only send when a value of an input changed.libraries on github