I need a GPIO expander to control 8 relays using NodeMCU and ESPHome, so I got an MCP23017 breakout board. The problem is, the seller told me that apparently this board is configured to run at SPI mode, not I²C. Is there a way for me to use this board with ESPHome? Or do I have to get another GPIO expander that runs on I²C mode?
The board I have is identical to this one from AliExpress. I bought the exact same board from a local e-commerce website in my country.
You’re right! It turns out the board I got is MCP23017, which uses I²C (not SPI because that would be the MCP23S17 version). The seller just didn’t know that much about the product he/she’s shipping to me. Without jumping any of the address pins, I was able to figure out that the default address is 0x20 by enabling the I²C scan on the I²C component. I tried jumping some of the address pins to VCC or GND and the address changed.