There are various ways to do it. One is a potentiometer (if the knob has a hard low stop and hard high stop it may be like this), or it could use essentially micro switches to send pulses that the device uses to count up or down. There are probably other ways to do it as well.
Latest Answers