Let's use the potentiometer to control a number of LEDs. We'll read the value of the pot and turn on more LEDs as the value of the pot goes higher.
Since we're putting these LEDs in a row, we call this type of project a "bar graph," and you can use it to display rising values in a number of different projects.
What you will learn:
Unlike Pulse-Width Modulation (PWM), this project uses what can be called a "stair step" approach. When the value of the pot hits predefined intervals, we turn on one more LED.
This is a bit different than PWM, which was varying in a continuous manner. Here, although the values of the pot vary continuously, we chop that input up and we only tell the Arduino to change its output when one of the predefined intervals is met.
Experiment with the potentiometer by turning the dial up and down.
Think of other things you could use the bar graph technique for. What else could you control a bar graph with, besides a potentiometer?