i am currently working with some power supply design and i can say using conventional pots(potentiometer) and rotary switch to adjust the voltage and other stuff is quite old school.
so i have decided to go for a bit high tech , actually bit digital.
so here is the solution
Incremental Rotary Encoder
and hear the output wave form
Decoding with Microcontroller
in this examples we will be decoding the rotary encoder with the help of sate machine.
view of state machine in the wave form