Joining Pins - Help

I would like to know if it is possible to digitally link 2 pins together (like a digital switch between 2 pins that can be controlled via the code) and if so what is the code for this?

eg. I have an Uno Rev3 and I would like the following pins to be joint in separately: (pins A2 to A5 are different antennas)

A1 - A2 delay A1 - A3 delay A1 - A4 delay A1 - A5 then cycle

Thanks, Paul

Store the result of the read in a variable, then write the variable to the other pin
(Or maybe I didn’t understand the question)

What i'm trying to do is I have 4 wires acting as radio antennas (not amplified) and then switch between them to get 4 different values for each one and store it as an array. I have 1 antenna cable coming out of my radio receiver and it's plugged into pin A1. The other antennas are plugged into A2-A5. Sorry I didn't explain it very well before.

It sounds like you are going to need some additional hardware such as relays to accomplish what you want. You cannot physically cause the Arduino pins to be connected using a program. What AWOL was suggesting, as inferred from your original post, was that you wanted pairs of pins to be in the same state, hence his suggested method, but it is not appropriate for your requirement now that it has been explained more fully.

No, sorry, I'm still not understanding. Why have you got an input to a radio receiver connected to an input on your Arduino?

I have 1 antenna cable coming out of my radio receiver and it's plugged into pin A1.

What is it you're trying to achieve?

If you are trying to use arduino to switch antenna connections to your receiver it won't work that way, You can connect the antennas to relays and switch them that way using digital output pins to activate the relays.

If you are trying to measure RF voltages picked up by the antennas that won't work either. The analog inputs on Arduino are not nearly fast enough to sample and measure radio frequencies and you won't be able to measure microvolt levels either without additional amplification.

Thats what I wanted to know, thank you :D I'll use relays :)