Pin issue on UNO R3

Whenever I insert a wire into an input pin in my Arduino UNO R3 board, no matter what else is going on with the wire, the digital reading fluctuates all over the place. When I disconnect the wire from the pin, the digital reading stays where it was when I took out the wire, meaning if I take out the wire when the digital reading is LOW, it will stay LOW until I turn the board off or put the wire back in, and the same goes for a HIGH reading. What's wrong with my board?

Probably need to see a good diagram of your wiring, or at least a photo, to have any real idea of what's going on.

My guess is that you have a "floating input".

1 Like

Nothing
What were you expecting to happen?

Nothing. When you have nothing connected to an input pin on the Uno it could be at any voltage so could read HIGH, LOW or could fluctuate

Any non-connected pin with have that behaviour; the wire acts like an antenna and just makes it worse (hence easier to see).

But this happens no matter WHAT the other side of the wire is doing. Even if I connect it to one of my push buttons (and yes, I've tried them all) it STILL goes crazy whether I push the button or not (it even doesn't matter whether it's in the breadboard).

Edit: I forgot to mention, it only fluctuates when the wire is in. It stops fluctuating when I take the wire out, but it's essentially put on puase. The reading will stay HIGH or LOW depending on when I took the wire out.

Even if the other side of the wire is connected to GND?

No, I didn't try GND, but I don't WANT it to be connected to GND for the sake of circuitry.

So turn on the built in pullup resistor on the pin and that will hold it HIGH

What? What is that, and how do I do it?

pinMode(pinNumber, INPUT_PULLUP);

Will turn on the internal pullup resistor for the pin and keep the pin HIGH unless explicitly taken LOW by some external action such as connecting it to GND

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.