LED's

I want to be able to turn a pot one way and have a red led turn on, then turn the pot in the opposite direction, the red led turns off and a green led turns on.

Can this be done? If so where can I find a code and how to wire up my UNO?

Thanks.

Yes
You can go through the sketch examples that come with the Arduino IDE to gain experience then write the sketch yourself.
When you run into problems with a concept you get get help with it here.

If you google, Arduino leds, and, Arduino analog input, you will find lots of examples of hook up and sketches.

Good stuff on connecting things to an Arduino here

...R

Do you mean turn from a central position so red is say on the left and green on the right? Or, do you mean that wherever the pot stopped last, wherever that may be, green and red are on opposite sides of that mark?

The former is trivial; the latter less so since you'll have to keep the previous reading so as to see if the current reading indicates turning left or right.

And what should happen when the pot is not moving?

The pots and servos control turnouts on a model railway. I want the green LED to stay on while the turnout is on the main track and turn off when the pot turns the turnout to the siding the green goes out and the red LED coms on.

They would stay either red or green until the turnout in moved. Maybe a bi polar led would be better.

Ok so it's more my first case than the second?

This example shows how to read a pot. Then instead of what the example does (which dims an led) you use an if...else to turn on one led if the pot value is less than 512 and the other one if greater. (Or if you need a dead bit in the middle, say less than 500 and greater than 520.)

Give that a bash. Normal practice here on the forum is not to provide ready made solutions, but to help when you get stuck, as mentioned above by others.

green3801:
while the turnout is on the main track and turn off when the pot turns the turnout to the siding

Wouldn't switches be more appropriate for controlling turnouts - and would also simplify the control of the lights.

You could easily arrange for slow motion of turnouts even if you use a switch.

...R