Pot Control

Is it possible to replace two 10k pots to digital pots and program the arduino so that when i press a button it adjusts the pots to a set value dependent on the output so if the output is reading 8v it will adjust the pots accordingly to lets say 5v when i press the button.

Your description is not at all clear.

Where does the 8v come from? The max for an Arduino is 5v.

What are the 10k pots already in? Do you have a circuit diagram for the device to enable you to figure out the specs that would be needed for digital pots.

...R

You can get digital pots (url=https://www.jameco.com/Jameco/Products/ProdDS/241744.pdf]example[/url]) with various digital interfaces.

But, there are voltage limitations, etc., and they are not electrically isolated so they don't always work to replace an analog pot. I say in most applications you can't replace and analog pot with a digital pot. In an "unknown circuit", I wouldn't recommend it.

set value dependent on the output so if the output is reading 8v it will adjust the pots accordingly to lets say 5v

If it's always proportional... if 8V gets knocked-down to 5v and 4V get's knocked-down to 2.5V, you can simply use a voltage divider or (another) regular pot.

Note you can't supply "power" from a pot. They are for low-power/low-current applications.

Do you really want a pot, or do you want a digitally-controlled voltage? Is it a power supply or a reference voltage?