O'Reilly logo

Beginning Arduino by Michael McRoberts

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project 6 – Interactive LED Chase Effect

Leave your circuit board intact from Project 5. You're just going to add a potentiometer to this circuit, which will allow you to change the speed of the lights while the code is running.

Parts Required

All of the parts for Project 5 plus....

4.7KΩ Rotary Potentiometer images

Connect It Up

First, make sure your Arduino is powered off by unplugging it from the USB cable. Now, add the potentiometer to the circuit so it is connected as shown in Figure 3-2 with the left leg going to the 5v on the Arduino, the middle leg going to Analog Pin 2, and the right leg going to ground.

Figure 3-2. The circuit for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required