I think you are on the right track.
I’d start by moving things off pins 0, 1, keep those clear for serial comm.
Then in loop: (you’ll to fix the autocorrecting going on here, and I’m going to simplify my example as in1, in2, in3, in4, and out1, out2, out3, out4)
Void setup():
//set pinModes for inputs
PinMode(in1, INPUT_PULLUP); // repeat for all 8 cable pins, ensures only 1 active output at a time, no 2 signals competing against each other
PinMode (redLed, OUTPUT);
DigitalWrite (redLed, LOW); // assumes LOW = off
PinMode (greenLed, OUTPUT);
DigitalWrite (redLed, LOW);
}
Void loop():
// test for shorts continuity of a signal, and no shorts to other signals
// 4 output test pins, 4 input test pins
//signal 1
PinMode (out1, OUTPUT);
DigitalWrite (out1,LOW); // drive 1 output low
State1 = digitalReadl (in1); // read all the inputs
State2 = digitalRead (in2);
State3 = digitalRead(in3);
State4 = digitalRead(in4);
If (state1 == LOW & state2 == HIGH & state3 == HIGH & state4 == HIGH){ // is the correct signal low?
DigitalWrite (greenLed, HIGH); // maybe flash one time for signal 1, twice for signal 2, 3 times, 4 times, etc.
}
Else { // nope, got a different signal low, or 2 or more signals low
DigitalWrite (redLed, HIGH); // same flash idea here.
}
Delay (2000); // allow some time to see the test result
DigitalWrite (greenLed, LOW); //
DigitalWrite (redLed, LOW);
PinMode (out1, INPUT_PULLUP); // set back to an input for the next signal
// signal 2
// same as above, but out2 as OUTPUT, test for HIGH -LOW-HIGH-HIGH
//signal 3
// same as above, but out3 as OUTPUT, test for HIGH-HIGH-LOW-HIGH
// signal 4
// same as above, but out4 as OUTPUT, test for HIGH-HIGH-HIGH-LOW
}