In this project you control a row leds with a potentiometer and the trailing leds behind it dim the further away they are to the one that is lit up. I used 5 green leds in the project and named them as such in the code. You make use different led as you wish for it.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Step 1: Add 5 Leds
First step is to attach 5 leds to the breadboard
Then attach 5 220 ohm resistors to the bent legs and attach a jumper wire to the same row as the resistors to pins 12-8 from right to left.
Finally attach a jumper wire to the longer leg and connect the other end to the GND rail for each led.
Attach a jumper wire going from the microcontroller 5V to the power(+) rail, and a jumper wire going trom the microcontroller to the negative(-) rail.
Step 2: Step 2: Add a Potentiometer & Code
Last step is to add a potentiometer to the breadboard and attach a jumper wire to the power rail to the furthest connection on right of the potentiometer. Another wire to pin A2 and the other end to the middle of the connection and finally a jumper wire to the last connection to the ground rail.
Code is attached