The wire is supposed to read another pins output and do something when it reads a HIGH signal. But the wire seems to be acting like a proximity sensor, sending a high signal whenever my hand gets near it. Am I supposed to be using the ground pins in some way?
It sounds like the input pin is floating, but the pin should never be floating if connected to an output. An output can only be HIGH (Vcc) or LOW (ground) so an input connected to it can never float.
Please post a schematic and/or a photo of your setup and your code so that we can see what you are doing.
Yes. If you have various modules, all the grounds must be connected.
Explain your situation properly. What wire is reading what pin's output? Give a diagram and/ or picture of all parts.
If you have a wire connecting an input pin to another pin as an output as your writing implies - but why would you do that? - then if the second pin is configured as an output it will be either HIGH or LOW and the input will read just that.
If you have a wire connected to an input and nothing else, it will act as a proximity sensor because it will pick up static electricity from the surroundings. So what is it?
groundFungus:
It sounds like the input pin is floating, but the pin should never be floating if connected to an output. An output can only be HIGH (Vcc) or LOW (ground) so an input connected to it can never float.
Exception for open collector/drain outputs without a pullup somewhere
But OP is not clear in that.
You are not the first to notice this. Full explanation here Inputs
I've included a wiring diagram of my setup. It's an arduino uno with seeed studio relay shield. A vibration sensor and 1k resistor sticks into pins 11 and 9. Here's a wiring a diagram showing what I've done, and code:
int relayPin = 4 ; //I want to use these three pins, 4 is a relay
int In = 3 ; //pin is declared (and later set to LOW, then looks for HIGH signal)
int Out = 8 ; //pin is declared (is set to HIGH and is connected to pin 3 through a vibration sensor and resistor)
int relayVal = 0 ; //its a variable, for reading value of relayIn
unsigned long currentMillis ; //these three lines form the basis for a kind of timer
unsigned long prevMillis ;
unsigned long interval = 3000 ; //3000 milliseconds is 3 seconds, for a 3 second timer
void setup()
{
Serial.begin(9600) ; //for debugging purposes, sets up a monitor
pinMode(relayPin, OUTPUT) ; //declares pin 4 as an output, it controls a relay
pinMode(Out, OUTPUT) ; //declares pin as output
pinMode(In, INPUT) ; //declares pin as Input
digitalWrite(relayPin, LOW) ; //sets the initial state of the relay pin LOW (off ... an open relay)
digitalWrite(Out, HIGH) ; //sets initial state of pin
digitalWrite(In, LOW) ; //sets the initial state of pin
prevMillis = millis() ; //initial state for timer (this resets it to 0)
}
void loop()
{
relayVal = digitalRead(In) ;
Serial.println(relayVal) ;
if (relayVal == 1) //if an impact is detected (there is a path through the vibration sensor connecting In and Out pins)
{
digitalWrite(relayPin, LOW) ; //open relay (turn it off)
prevMillis = millis() ; //then restart the countdown
}
if (millis() - prevMillis >= interval) //if time has expired
{
digitalWrite(relayPin, HIGH) ; //close relay (turn it on)
}
}
Grumpy Mike, if I read the resource correctly, the solution seemed to be to put in a 1k resistor. I am looking at what the article says, especially the "run long leads to the Arduino" making the problem worse, because I'll be using long wires.

Your code says pins 3 and 8, not 9 and 11, do you have a pullup (or down) resistor (10k) on pin 3?
"run long leads to the Arduino" making the problem worse, because I'll be using long wires.
Then you may or may not have trouble.