if (digitalRead(pinArray) == LOW && !ShortedOnPcb(a,b)){ // Has the pin been pulled low by a short?
Serial.println(" ****FAIL****");
}
else
{
Serial.println("PASS");
}
Then add the ShortedOnPcb() method:
boolean ShortedOnPcb(byte outputPin, byte inputPin)
{
switch(outputPin)
{
case 2:
return (inputPin==10);
break;
case 23:
return (inputPin==44);
break;
}
return false;
I can't follow your code without the declarations. Put those in there explaining what outputpin & inputpin mean. I don't know what the reason for this naming is.
the only problem i have is that some of the pins are shorted through tracks on the PCB board i wish to test, What i now need to introduce into the code is a way of saying the 8 pairs of pins that are shorted are still passes even though they are returning a high reading.
For example
Pins 2-66 are all tested against one another they are taken for a one dimensional array one at a time and tested.
All Pins except (2 and 10) (23 and 44) (24 and 30 ) (29 and 31) (32 and 33) (39 and 41) (42 and 47) and (55 and 60) will return a low and a pass but the above pairs will return a high and a fail,
What i want my code is to acknowledge these high as passes.
What I mean is, like with this,
boolean ShortedOnPcb(byte outputPin, byte inputPin)
(2 and 10 )
(23 and 44)
(24 and 30 )
(29 and 31)
(32 and 33)
(39 and 41)
(42 and 47)
(55 and 60)
Can you tell me which of these are Inputpins and which are outputpins ?