Add utility functions for interfacing with MCP GPIO expanders via smbus/i2c, and processing rotary encoder data.