The Arduino doesn't have a variable voltage output - the 'analog' outputs produce pulse width modulated square waves which are often used to make LEDs and so on display variable brightness, but this is done by switching them on and off very rapidly and not by outputting a variable DC voltage. In order to achieve that, you'd need to connect a digital to analog converter, digital potentiometer or some other way to convert a digital signal to your required analog voltage.