Hi, I'm very new to Arduino so there may seem like an obvious answer to this question but I'm having trouble addressing pins on an IO expander in an array.
I am using multiple MCP23017 -E/SP chips in a cable continuity testing project. I am trying to create an array that lists the pins of these IO expanders however I'm not sure how to call them up.
I have got the chips working and addressed correctly but it seems to be more of a syntax issue I'm having with this particular problem.
For example, if I want to reference GPIO pin 3 on mcp2 in my array, I am unsure how to write that into the software. I have put some code above of what I assumed it would be [mcp2(3)] but this obviously doesn't compile and I wondered if someone knew how I should write this so that the array looks at the correct pin.
This would make writing the pins into an array much easier as they would all be successive but I just wanted to know if this was possible before wasting my time trying to make it happen?
I have attached how the chips are wired with the diagram and I'm obviously just using different addresses for the different chips but I don't really understand what the code is doing.
I do not have a schematic for this I just wish to be able to address the IO expansion pins on the chips in a similar manner to that of the Arduino board pins.
For examples sake you could imagine that I want to run a continuity test of a cable with 2 ends where each connector has 60 pins so I need 120 total IO and I will be using the IO on the expansion boards to do this test.
The cable would have simple end to end connections e.g. pin 1 on connector 1 goes to pin 2 on connector 2 and so on but I just need to be able to call up the IO expansion pins in my array to be able to do this.