Pages: [1]   Go Down
Author Topic: RGB LED Controller  (Read 550 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 98
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay..so I just got my arduino duemilanove and RGB led pack. smiley .  I am not at all into programming and want the arduino to control a single rgb led and change its colour randomely. smiley-roll . Please give me a code and pn configuration for this project and i would be so thankful. Please Help....!   

HELP NEEDED !
Logged

Minds are like parachutes. They only function when they are open.

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.ladyada.net/learn/arduino/lesson3.html
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2487
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look in playground "LED Lights and Displays":
http://arduino.cc/playground/Main/InterfacingWithHardware#Output
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 516
Posts: 31579
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Assuming you have a common anode RGB LED.
Wire up like it is shown here.

Then use
Code:
analogWrite(9,redValue);
analogWrite(10,greenValue);
analogWrite(11,blueValue);

Where redValue, greenValue, blueValue, are all variables with the values between 0 and 255.
Note a value of 0 will be full bright and a value of 255 will be off and a value of 128 will be half way bright.

* rgb.pdf (65.83 KB - downloaded 13 times.)
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 98
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nothing about RGB LED there johnwasser dude..sorry to say...still thanks smiley

Look in playground "LED Lights and Displays":
http://arduino.cc/playground/Main/InterfacingWithHardware#Output
Its all about LEDs but nothing about RGB LED Controller...Still thanks... smiley

Assuming you have a common anode RGB LED.
Wire up like it is shown here.

Then use
Code:
analogWrite(9,redValue);
analogWrite(10,greenValue);
analogWrite(11,blueValue);

Where redValue, greenValue, blueValue, are all variables with the values between 0 and 255.
Note a value of 0 will be full bright and a value of 255 will be off and a value of 128 will be half way bright.
Thank You..! smiley Finally..
Logged

Minds are like parachutes. They only function when they are open.

Pages: [1]   Go Up
Jump to: