Introduction: Led Fade Demo

Picture of Led Fade Demo

LED fade demo for my final

Step 1: Connections

Picture of Connections

1. First connect the 5V and GND to the power and ground rails on the breadboard.

2. Connect the left potentiometer pin to the hot and the right most to the ground.

3. The middle/top pin should go to an analog pin, I chose to use A0.

4. Connect the led's ground wires to the ground rail

5. Connect the hot line from the LED to a 220 ohm resistor and then connect those to pins 12-8 so the fading is right.

Apply the code and bam. (Code in step 2)

Step 2: Code

Picture of Code

The code is decently simple and could very likely be improved. I used hard coded values so once it reach's a certain PWM level if would change the lights as needed. I used a "vals" array to simply hold my values for updating, this really just made it a little easier to visualize for me.

Comments

About This Instructable

19views

0favorites

License:

More by xalixwillisx:Servo Motor Keypad ControlLed Fade DemoClock and Weather Station
Add instructable to: