3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Fading RGB LED (Arduino)

Fading RGB LED (Arduino)
In this Instructable I'm going to show you how to make a simple fading RGB Led.
It can be used as a nice night lamp or as mood lighting.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Parts

To make it you'll need:
- an Arduino ( I'm using an Arduino UNO R3, but others may work aswell )
- an RGB Led ( I used a common anode one, common cathode will work too )
- a Breadboard
- some wire
- 2 resistors 180 ohm  ( Brown, Grey, Brown, Gold )
- 1 resistor 330 ohm ( Orange, Orange, Brown, Gold )
« Previous StepDownload PDFView All StepsNext Step »
14 comments
Apr 12, 2012. 9:52 PMadammary says:
Hi, your tutorial looks great and I'm going to try it soon.
I don't have the components yet, but for now I'm trying to understand the code.

In the first for loop, the LED slowly fades from green to red right?
But from what i understand in the second for loop, the LED fades from blue to green. Don't you need a for loop that fades the LED from red to blue before starting the second for loop to make sure smooth fading?

In other words, shouldn't the 3rd and 2nd for loops need to switch places so that the color fading is in order?

This is what I understand from the code. Correct me if i'm wrong.


Apr 12, 2012. 9:58 PMadammary says:
oh wait nevermind i got it now. i didn't realize that all three pins are initially set to high
Apr 6, 2012. 9:15 AMon6mj says:
Great!!!!!
Apr 7, 2012. 1:20 AMon6mj says:
OK, but your program is short and verry efficient.
Realy smooth color changing.
Realy nice.
Best WE,
Jean.
Jan 22, 2012. 9:30 AMjborgne says:
this is a good instructable. Very clear and easy todo, and does not require a ton of parts to complete. Keep up the good tut's.


Jan 11, 2012. 8:41 PMHiggs Boson says:
In the schematic it appears the LEDs have a common anode. but I've read that RGB LEDs have a common cathode.
Jan 12, 2012. 5:44 AMHiggs Boson says:
Okay. thank you.
Jan 12, 2012. 9:17 PMHiggs Boson says:
It seems to have everything you would need to make this project. I think it is very good. I'll probably make it sometime soon.
Jan 16, 2012. 8:37 AMHiggs Boson says:
I just made it, and it works great.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
0
Followers
1
Author:cyragia