Hello all!
I am attempting to build up a circuit tester that will be testing if certain terminal connectors are completely short circuited. I have four different terminal connectors to test; 4-Pin, 6-Pin, 8-Pin and 12-Pin. The idea is to use a 2 Way DIP switch in order to signify which connector is being tested. So say if switch 1 is ON, then I am testing a 4-Pin connector, if switch 2 is ON then I am testing a 6-Pin, if both switch 1 and 2 is ON then I am testing a 8-Pin connector and if both switches are OFF, then I am testing a 12-Pin connector.
Also, I am trying to make this circuit tester as a PASS/FAIL system by setting up a green LED to indicate a PASS or a red LED to indicate a FAIL. I believe I have the coding for this part started for the 4-Pin test, but I am only a beginner in coding and working with Arduino so any help will be appreciated!
int pinZeroInput = 0;
int pinOneInput = 1;
int pinTwoInput = 2;
int pinThreeInput = 3;
int LEDG = 12;
int LEDR = 13;
void setup()
{
pinMode(LEDG, OUTPUT);
pinMode(LEDR, OUTPUT);
if (pinZeroInput == 1)
digitalWrite(LEDG, HIGH);
else digitalWrite (LEDR, HIGH);
if (pinOneInput == 1)
digitalWrite (LEDG, HIGH);
else digitalWrite (LEDR, HIGH);
if (pinTwoInput == 1)
digitalWrite (LEDG, HIGH);
else digitalWrite (LEDR, HIGH);
if (pinThreeInput == 1)
digitalWrite (LEDG, HIGH);
else digitalWrite (LEDR, HIGH);
}