The issue is, pinMode(X, INPUT_PULLUP) does not actully turn on the pullup for either pin; the ADC readings are always floating. Whichever pin I'm using still successfully detects a short when intended, but because It is floating and never pulled high, it causes a lot of false flags. Code below:
Code: Select all
int foo=9999;
pinMode(25, OUTPUT);
digitalWrite(25,HIGH);
pinMode(32,INPUT_PULLUP);
while(foo>0){
foo=analogRead(32);
Serial.println(foo);
//do other stuff
}