can we use potentiometer to regulate voltage form o-5v.

that is . if we rotate the potentiometer it will give some voltage variation as output.
If there any circuit available pls let me know the function of that circuit.