I made a small change to the library i2c - MCP23017.
Now when the pins are set as inputs, the signal arriving at the PLC reflects the opposite logical state with respect to the input signal.
In practice, when the pin is set to 0V, the high signal arrives on the PLC.
I think it's easier to manage inputs this way.
I provide both the normal library and the compiled library.
What do you think?
I2C_MCP23017_Confa.compiled library [160.9 KiB]
I2C_MCP23017_Confa.library [304.06 KiB]
Log in to post a comment.