fading rgb led (arduino)
It can be used as a good night LED Light module or mood lighting.
To do this, you need :-an Arduino (
I am using Arduino UNO R3 but others can use it as well)-an RGB Led (
I use a common anode, and the common cathode can also be used)-a Breadboard-some wire-
2 resistors 180 ohms (
Brown, gray, brown, gold)-
1 Resistance 330 ohms (
Orange, brown, gold)
The schematic diagram is simple.
If you have a co-melt anode led (like i do)
If you have a co-cathode led, just connect it to 5 v.
Connect the other 3 leads to the 3 PWM pins on the arduino with a resistor (
Value depends on led).
The code is a bit difficult but quite simple.
This code is only for co-anode LEDs.
If you want to use it for a co-cathode LEDs, you have to change all the \"analogy\" lines to \"analogy \"(
So it should work (
I have not tested).
Define Green 3 define Blue 5 define Red 6 define delay time 20void pinM digitalW}int redVal; int blueVal; int greenVal; Void analogW}
Greenvale-Ralph Bluff= 1;
Blue Eagle-Blue Eagle= 1;
Expand/modify/improve/With your imagination /. . . the project.
Show your work in the comments, please let me know what you think of this note as this is my first note.
Also please correct me if I make any mistakes.
Demo Photoelectric Technology (Wuxi) Co., Ltd. is dedicated to servicing our customers with a wide array of high-quality service and products.
Demo Photoelectric Technology (Wuxi) Co., Ltd. is an expert when it comes to About Us. Got some About Us problems that you want to address? Visit us now and we'll help you fix those problems ASAP. Go to Demo Led Module for more details.
With innovative technology, our professionals can spend more time focused on strategies that will improve About Us’s quality and deliver a more positive customers experience.
As the full potential of led light engine module lies in , the demand for is increasing globally, and is being adopted across the global market.