Introduction: Final Exam - Project 1
Today we will create a row of led lights that are controlled by a potentiometer. To begin this activity you will need:
1 Arduino Microcontroller
1 Full Size Breadboard
5 Led Lights
A Bundle of Copper Wires
Step 1: Adding LEDS and Potentiometer
To begin this process, we must add all of our respective pieces to the breadboard. Begin by running a copper wire from the 5V pin on the Arduino to the breadboard's power rail (+). Now run a copper wire from the GND pin to the ground rail on the breadboard (-). Now we begin adding our 5 LEDS and connecting them to their respective pins. Connect the LEDS starting from the right to pins 3, 5, 6, 9, and 10. These are pulse width modulation pins and will allow us to set specific brightness ratios for this exercise. When this is done run a ground wire from each LED to the ground rail (-). Place the potentiometer on the breadboard and run a wire from its analog pin to pin 'A2' on the Arduino. This process is finished by connecting the potentiometer to the power rail (+) and ground rail (-). Refer to the image for visual aid.
Step 2: Test Your Project
With all pieces in place, the project should now be fully functional. The potentiometer will move the selected LED based off which direction you turn it. Furthermore, bordering lights are slightly less bright than the selected LED by using pulse width modulation. I have attached the source code to assist you with your testing.
We have a be nice policy.
Please be positive and constructive.