byte result = 0; //
byte ICpin = 2; // D2 to 8870 pin to test
void setup()
{
pinMode(ICpin, INPUT);
Serial.begin(9600);
}
void loop()
{
result = digitalRead (ICpin);
if (result == 1)
{
itisHigh();
}
else
{
itisLow();
}
delay (10);
}
void itisHigh ()
{
Serial.println("Pin = 1");
}
void itisLow ()
{
Serial.println("Pin = 0");
}
Try a 4.7K resistor, or so, to Gnd (instead of the LED circuits).
I appreciate the pic, but if this doesn't work out - could you take another after tidying things up some, and we can see all of the connections (ground wires, + wires, all of it), leaving the observer to assume nothing, and just as they are under test?