Code that "breaks" arduino

bperrybap:
It would be simpler if you did it the other way around as I previously described by using INPUT_PULLUP mode on the input pins and grounding the remote end.
If you see high on the input, the ground on the other end of the wire is not present.

BTW, how long are the wires you are testing?
Depending on the length, you may run into other issues like voltage drop within the cable wiring that can cause issues.

--- bill

I re-did my code as you suggested, changing all my inputs to input_pullups and then connecting the other end of my cables to ground instead of +5V. I Inverted the check cases for my while loops and the code works perfectly now (!=HIGH became ==HIGH and vice versa.)

I still don't quite understand how you where suggesting to incorporate output pins back on page 4 but I may continue to think about this in order to detect shorts and also be able to communicate which wire is discontinuous.(?) (Even if these things aren't necessary I'm just trying to learn as much as I can from this project.)

Here's the new code:

void setup() {
  //
  int x=2;
  
  while (x<11) {
  pinMode(x, INPUT_PULLUP);
  x++;
  }

  pinMode(12, OUTPUT);
  pinMode(11, OUTPUT);

}

void loop() {

  //
  digitalWrite(12, HIGH); // 12 is red LED, no continuity
  digitalWrite(11, LOW);  // 11 is green LED, continuity
  
  int pin=0;
  int twopin = 2;
  int threepin = 4;
  int fourpin = 7;      // declare variables and set green LED to off and red LED to on by default

  
  
  while (digitalRead(2) != HIGH) { //check 1st connectors (2pin)
    
    while (twopin<4) {
      if (digitalRead(twopin) == HIGH) {
        pin = 12;
        break;
      }
      else {
        pin = 11;
      }
      twopin++; 
    }

    if (pin == 11) {
      digitalWrite(12, LOW);
    }
    
    digitalWrite(pin, HIGH);
  }

  
  
  while (digitalRead(4) != HIGH) { //check second connectors (3pin)
    
    while (threepin<7) {
      if (digitalRead(threepin) == HIGH) {
        pin = 12;
        break;
    }
    else {
      pin = 11;
    }
    threepin++;
   }

    if (pin == 11) {
      digitalWrite(12, LOW);
    }
    
    digitalWrite(pin, HIGH);
  }
  
  while (digitalRead(7) != HIGH) {  //check third connectors (4pin)
    
    while (fourpin<11) {
      if (digitalRead(fourpin) == HIGH) {
        pin = 12;
        break;
    }
    else {
      pin = 11;
   }
   fourpin++;
    }

    if (pin == 11) {
      digitalWrite(12, LOW);
    }
    
    digitalWrite(pin, HIGH);
  }

  
}

The longest cable I have to test is about 20" or just over a 1+1/2 feet.