Hello! I am new to this forum, but I had to register after struggling for some time with my problem.
I am using ESPHome and the I have tried to build my setup with ESP8266 (nodemcu) with i2c using MCP23017 or PCF8574. What I can do is write to pins on my MCP23017 or PCF8574 (i can control relays etc). But for my setup I need to read the status of the pins (binary input).
I have no problem reading the “local” pins of ESP8266, but as soon as I change the pins to MCP23017 or PCF8574 I get nothing.
From this I assume following:
- the code is ok
- i have missed out something with reading the pins.
So what is the hardware configuration to reading from the pins if using i2c devices such as MCP23017 or PCF8574. I have tried multiple MCP23017 versions and PCF8574, all have the same problem.
Should there be a resistor or so, if so what size (ohm)?
Thank you in advance!