arduino due programming question

hi ppl,

i am a newbie in arduino programming. and here is the question, i'd like to make an adjustable output voltage on arduino due board between 1v -5v based on the input, i have no clue where to start since everything i found on internet is to output a fixed voltage but not adjustable.
can anyone help me with the programming?

cheers.

  1. What is the "input" that you would like to use to modulate your voltage output?

  2. What is the desired relationship between the input and the voltage output?

That would probably need a rail-to-rail opamp to boost the DAC output upto the full
5V range.