I'm trying to set up the MCP23017 I2C 16 port expander to capture presses on a 4x3 membrane keypad. However, I'm a bit lost as to how to physically hook these items together and also a bit confused as to how I would implement the code.
I currently have the GPIOB side of the MCP23017 mapped as inputs and I've successfully captured state changes of a push button, confirming the change by illuminating the corresponding LED on the GPIOA bank.
Now I want to swap out the push buttons for the keypad, but I'm not sure how it should be connected.
I've downloaded and attempted to get the Keypad_I2C examples from arduino.cc working, but they seem to be written for a PCF8574 - not sure if my MCP23017 is a drop-in replacement for that.
I haven't had much luck getting the chip to respond to state changes on the keypad.
- Is it even feasible to do what I'm attempting?
- If so, how do I need to physically connect the 4 row and 3 column pins to the MCP23017?
- Should the Keypad_I2C be working for me or do I need to write something from scratch?