It can be used as a nice night lamp or as mood lighting.
Remove these ads by
Signing UpStep 1Parts
- 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 Step | Download PDFView All Steps | Next Step » |















![P020112_17.16_[02].jpg](http://img.instructables.com/files/deriv/FFA/5KNL/GWF5UGO9/FFA5KNLGWF5UGO9.SQUARE.jpg)
![P020112_17.16_[01].jpg](http://img.instructables.com/files/deriv/FCA/KJPT/GWF5UGO8/FCAKJPTGWF5UGO8.SQUARE.jpg)

























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.
Realy smooth color changing.
Realy nice.
Best WE,
Jean.
in my schematic i used a common anode one because i only have common anode ones.
What do you think of my instructable ?
Any ways i can improve it ?