Weird analog input behavior

When I read my Arduino Leonardo A0's value, I get ~350, even though nothing is connected to the pin.

As soon as I connect a wire to the pin, I get oscillating values between 0-1023.
It's just a simple wire; its other end isn't connected to anything.

What might cause this?

Forum Rule #1

There will be, at least once a month, a post citing "weird" behaviour of an unconnected pin.

It's just a simple wireantenna; its other end isn't connected to anything.

Forum Rule #1
There will be, at least once a month, a post citing "weird" behaviour of an unconnected pin.

I get it, you know more about electronics than I do.
Now that we've established that, can you say something more useful, or refer me to relevant material?

Why would it read 350 when there's no input?

I found it useful. He said the analog input is floating, and acting like a radio antenna. Connect the other end of the wire to something like GND or some low impedance output.

I described 2 separate issues in my message; with and without a wire connected.
I get that there's some antenna phenomena with a wire connected, but still, why I read 350 when no wire is connected?

jako78:
I described 2 separate issues in my message; with and without a wire connected.
I get that there's some antenna phenomena with a wire connected, but still, why I read 350 when no wire is connected?

Still floating, just a shorter antenna. The internal electronics may "bias" the pin to 350 with a high impedance source. Get something with a lower impedance connected to it, like a 10K pot or voltage ladder.

OK, thanks.
Can you recommend where I can read more about it?

Google "Floating input pin"

@AWOL: You beat me to it. I didn't see you online.

Any course in basic electronics would help you. Like AWOL said, this is not uncommon, so don't feel alone. Many have fallen victim to floating inputs.

Thanks guys.

jako78:
but still, why I read 350 when no wire is connected?

You can regard unconnected inputs as undefined. So for example, I don't know your age. That doesn't mean it is zero. It could be anything. Same with the analog input pin.