This may sound crazy, but ... I have a project in which I'd like to control the speed of a motor with a single potentiometer-type device which acts more like a volume control on a modern stereo (i.e. there is no 'stop' at either end since the volume on a stereo/AVR can be controlled by a remote). There would be another button (momentary) which would reset the motor speed to a set default value, and then turning the potentiometer-type device CCW would slow it down while turning it CW would speed it up. At any time if the user pushes the momentary button the motor speed would be set to the default, where the user could then speed up/slow down the motor as they wished.

Is that possible? I haven't even found the potentiometer-type device yet but if I did would anyone be aware of some PBP code examples?