Introduction: -=!TRI-COLOR LED MOOD-LIGHT!=-

Picture of -=!TRI-COLOR LED MOOD-LIGHT!=-

I like The Arduino a lot so I decided to make a Instructable for a L.E.D. MOOD-LIGHT that goes like this:
Green=on
Yellow=on
red=on
Green=off
Yellow=off
Red=off
And So on.

Step 1: -=Parts=-

Picture of -=Parts=-

You Will Need:
1x Yellow LED
1x Red Led
1x Green Led
?x Jumper Wires
3x Resistors
1x Arduino UNO
1x Solder-less Breadboard
20x Minutes

Step 2: -=Place the LEDS=-

Picture of -=Place the LEDS=-

Put The LEDS onto your breadboard as show in the picture.

Step 3: -=Connect the Negative Leads=-

Picture of -=Connect the Negative Leads=-

Connect the negative leads of the LEDs to the negatve rail. 

Step 4: -=Add the Resistors=-

Picture of -=Add the Resistors=-

Add the resistors to the positive leads on the LEDs.

Step 5: -=Connect GND to Negative Rail=-

Picture of -=Connect GND to Negative Rail=-

Connect the GND pin on the Arduino to the negative rail on the Arduino.

Step 6: -=Connect Pin 13=-

Picture of -=Connect Pin 13=-

Connect pin 13 on the  Arduino to one end of the resistor connected to the green Led.

Step 7: -=Connect Pin 12=-

Picture of -=Connect Pin 12=-

Connect pin 12 on the Arduino to the resistor connected to the yellow Led.

Step 8: -=Connect Pin 8=-

Picture of -=Connect Pin 8=-

Connect pin 8 on the Arduino to the resistor connected to the red Led.

Step 9: -=Get Coding=-

Picture of -=Get Coding=-

This is the Code:
(Made By Me)

Just copy and paste into ARDUINO!

/*
  This Code Is Made By Building_Boy For Instructables.
  It Will Cylcle Through A Red, Green, And Yellow L.E.D.
*/

void setup() {               
//Delcare pinModes
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(8, OUTPUT);
 
}

void loop() {
  digitalWrite(13, HIGH);   //Turn On Green LED
  delay(250);              //Delay
  digitalWrite(12, HIGH);   //Turn On Yellow LED
  delay(250);              //Delay
  digitalWrite(8,HIGH);     //Turn On Red LED
  delay(250);              //Delay
  digitalWrite(13,LOW);     //Turn Off Green LED
  delay(250);              //Delay
  digitalWrite(12,LOW);     //Turn Off Yellow LED
  delay(250);              //Delay
  digitalWrite(8,LOW);      //Turn Off Red LED
  delay(250);              //Delay
}

Step 10: -=How to Change the Speed=-

Picture of -=How to Change the Speed=-

To change the speed you need to open the code and change all of the (1000) into smaller numbers (For best effect use 250 on all the delays.

Step 11: -=!DONE!=-

Just Load the Code And You are done!

Now you have a cool mood-light!

Comments

About This Instructable

5,130views

8favorites

License:

Bio: I love making electronic kits and playing sims 3. If you have any ideas tell me and I will see what I can do! :-) :-):-) :-) :-) :-) :-) More »
More by building_boy:Arduino, LED, Dice!-=!TRI-COLOR LED MOOD-LIGHT!=-Cool, non functional, pinwheel!  :-)
Add instructable to: