Good morning,
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.
I really appreciate your changes on the library regarding the polarity of inputs. Additionally I tweaked it a little bit to controll this for each port with a variable.
Good morning,
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?
Massimo
I2C_MCP23017_Confa.compiled library [160.9 KiB]
I2C_MCP23017_Confa.library [304.06 KiB]
I really appreciate your changes on the library regarding the polarity of inputs. Additionally I tweaked it a little bit to controll this for each port with a variable.
What do think?