Another option for user input is to use the ADC to read the position of a potentiometer. Let's revisit some of the things you learned in Chapter 4, PWM and ADC Subsystems, to make our program a bit more interesting.
For this circuit, you will need:
Put it all together on your breadboard, as shown in the figure:
This circuit might look a lot more complicated than what we've done so far, but really ...