We make a lot of different kits, many of them for audio synths. One of them allows you to use a rotary encoder on a breadboard for your projects.
What are rotary encoders?
Rotary encoders, also known as shaft/quadrature encoders, are devices that can convert the motion of a shaft/axle into analog or digital code. For instance, your volume control dial in the car stereo, or oven knobs, are rotary encoders. Simply put, these are used when your project needs to know if a knob has gone in a particular direction, speed, or position.
How does it work? (Ref: http://www.ni.com/white-paper/4763/en)
So on this particular rotary encoder that we’ve provided, there are 3 values you can keep track of. S (for switch, like a momentary switch), A, and B.
"The most common type of incremental encoder uses two output channels (A and B) to sense position. Using two code tracks with sectors positioned 90 degrees out of phase, the two output channels of the quadrature encoder indicate both position and direction of rotation. If A leads B, for example, the disk is rotating in a clockwise direction. If B leads A, then the disk is rotating in a counter-clockwise direction. By monitoring both the number of pulses and the relative phase of signals A and B, you can track both the position and direction of rotation." With S - you treat this like a momentary switch. When you press it down, it will register one value (either 1 or 0), and when you let go, it will register another value (either 1 or 0)
So I have this kit, what do I need to know?
Step 1: To use it with a Propeller Microcontroller
Example Code (for the Propeller microcontroller):
When the code is run, the serial terminal shows information like the picture as you turn the knob left or right!
Step 2: To use it with a PIC 16f1705
We also made it work with a PIC so that if you wanted to hook it up to a servo and have the quadrature encoder control which direction the servo went, you could!