The below was what I designed for a detector of the input port of 40 pins connector, it can be expanded to more pins to detect that when you need more I/O ports.
The below was what I designed for a detector of an output port of 40 pins connector, it can be expanded to more pins to detect that it just needs more I/O port.
The below was what I designed for a detector of an output port of 40 pins connector, it can be expanded to more pins to detect that it just needs more I/O port.