Raspberry PI functions for use with MCP23017