This library gives easy control over the 8 pins of a (I2C) MCP23008 chip. This IC is strongly related tot the MCP23017 I2C port expander - https://github.com ...
This readme provides instructions on how to build / use a Meshtastic I2C sensor in both host and client modes. There are two PlatformIO environments available as examples to build off of: kb2040_host ...