[Project 6] – RGB LED Control With Arduino

You are here:
Estimated reading time: 1 min

In this project we will make RGB LED Control With Arduino. To understand this project  you should know working prencible RGB (RGB: Red Green Blue; LED: Light Emitting Diode ) I will use arduino uno in the circuit design program. I use usually arduino mega 2560.  You can use the other arduino cards. This project for beginners

Schema:

 

RGB LED Pins:

RGB LED Pins:

Materials:

  • Arduinord     x 1
  • 330 ohm resistor   x 3
  • RGB LED    x 1
  • Jumper Cable

Program:

// [Project 6] - RGB LED Control With Arduino

const int BlueLed=10;
const int GreenLed=9;
const int RedLed=8;


void setup()
{
pinMode(BlueLed,OUTPUT);
pinMode(GreenLed,OUTPUT);
pinMode(RedLed,OUTPUT);

}

void loop()
{
  
digitalWrite(BlueLed,HIGH);  
digitalWrite(GreenLed,HIGH);  
digitalWrite(RedLed,LOW);  
delay(1500);
  
digitalWrite(BlueLed,HIGH);
digitalWrite(GreenLed,LOW);  
digitalWrite(RedLed,HIGH); 
delay(1500);
  
digitalWrite(BlueLed,LOW);  
digitalWrite(GreenLed,HIGH);  
digitalWrite(RedLed,HIGH);  
delay(1500);

digitalWrite(BlueLed,LOW);  
digitalWrite(GreenLed,LOW);  
digitalWrite(RedLed,LOW); 
delay(1500);
}

Project Related Images:

Was this article helpful?
Dislike 0
Views: 121

Leave a Reply

Your email address will not be published. Required fields are marked *