[Tronixstuff] MCP23017 | I2C Port | Help wanted

The very first thing you should do, before writing the code, is to make sure your hardware setup is correct. Wiring a piezo sensor directly to the Arduino pins may work, but it's a hack. It may not work with the MCP23017; piezos can produce high voltage pulses and it could easily damage the MCP23017 inputs. One possible way to prevent damage would be a 5V Zener diode connected between the piezo outputs and ground. This would hopefully limit the voltage to 5V and eliminate the risk of damage.