LED Control With Potentiometer - FinalExam

For my Final Exam Project, I created a LED controller using a potentiometer. The purpose of this project is to use the potentiometer to control which LEDs are on. When the potentiometer is turned clockwise, it fades the LEDs on so that the first LED is brightest, the second is a little dimmer, the third is barely on, and the fourth and fifth are completely off.

Here's a list of the items used:

  • LEDs (x5) - I used 5 different colors.
  • 220 Ohm Resistors (x5)
  • Jumper Wires (x10)
  • Arduino Uno
  • Breadboard

Step 1: Add the LEDs

Here is where I added the LEDs to the breadboard and then to the Arduino. I used 5 different colors for the LEDs for aesthetics.

1. First, connect the LEDs to the breadboard.

2. Connect the short end of the LEDs to the ground rail.

3. Connect the long end to the Arduino using the 220(ohm) Resistors.

4. Connect the LEDs to pins 13, 12, 11, 10, and 9 on the Arduino.

5. Using a jumper wire, connect the ground rail to the GND on the Arduino.

Step 2: Add the Potentiometer

Here's where I connected the potentiometer to the Arduino.

1. Place the potentiometer on the breadboard.

2. Connect the left pin on the potentiometer to the Power rail on the breadboard.

3. Connect the right pin on the potentiometer to the Ground rail on the breadboard.

4. Connect the middle analog pin to the A5 Analog port on the Arduino.

5. Using a jumper wire, connect the Power rail to the 5V port on the Arduino.

Step 3: Upload the Code

Here is the code that will run the program. Upload it to the Arduino Uno and enjoy!



    • Build a Tool Contest

      Build a Tool Contest
    • Remix Contest

      Remix Contest
    • Pocket Sized Contest

      Pocket Sized Contest