Digital potentiometer - different voltage
Without knowing more about your circuit: I would use a DAC (Digital to Analog Converter).  If you can find a DAC that runs off 10V great, otherwise just use a 5V DAC and put an opamp with a gain of 2 in front of it (or even a 3.3V DAC and a gain of 3).

Your microcontroller will send a serial command to the DAC to set its output voltage.

This is what a non-inverting opamp circuit with a gain of 2 could look like:







simulate this circuit &ndash; Schematic created using CircuitLab