I did quite extensive work on the MCP23017... the only challenge I faced was a spike when I added interrupt extension caused by Espruino pin mode change. This is now though fixed (1v95). I started with the available module to learn the MCP23017. Wading through the code made me though apply some changes... last but not least because I wanted add the interrupt functionality.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I did quite extensive work on the MCP23017... the only challenge I faced was a spike when I added interrupt extension caused by Espruino pin mode change. This is now though fixed (1v95). I started with the available module to learn the MCP23017. Wading through the code made me though apply some changes... last but not least because I wanted add the interrupt functionality.
Take a look at Exploring adding setWatch/clearWatch (inerrupt handling) to MCP23017 (MCP2308) Portexpander Ports. It includes a rewrite of the module. You can ignore the interrupt part...