Main Site Documentation

Cobra I2C Relay16


Im getting the below error on my new cobra @ line.
I2C = new I2CDevice(new I2CDevice.Configuration(0x20, 100));

Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (1)

Any ideas?


Could you post a little more code ? How was the object I2C declared ?


The relay driver has been updated before. See this post:

Please post how this I2C object is declared in code.


Im a dunce :-[ .Something in my code (who knows where) is reserving the pin. I have to track it down. The TFT doesnt use I2C, does it?


All free pins on cobra are not used by the display. See this page


It was me being silly. I already had defined a Relay16 device in another class.


No problem, if you have any questions left, please let us know :wink: