Working with RGB LED

Working with RGB LED © GPL3+

This project demonstrates the working an RGB LED with Arduino.

  • 646 views
  • 2 comments
  • 4 respects

Components and supplies

Apps and online services

About this project

This project demonstrates the working RGB LED using Arduino.

Objective:

Red color glows for the first second and then the Green color glows for the next second followed by the Blue color and this repeats.

Working with RGB

Code

working with RGB LEDArduino
const int RED = 11;
const int GREEN = 10;
const int BLUE = 9;

void setup() {
  pinMode (RED, OUTPUT);
  pinMode (GREEN, OUTPUT);
  pinMode (BLUE, OUTPUT);
}

void loop() {
  analogWrite (RED, 255);
  analogWrite (GREEN, 0);
  analogWrite (BLUE, 0);
  delay (1000);
  analogWrite (RED, 0);
  analogWrite (GREEN, 255);
  analogWrite (BLUE, 0);
  delay (1000);
  analogWrite (RED, 0);
  analogWrite (GREEN, 0);
  analogWrite (BLUE, 255);
  delay (1000);
}

Schematics

Breadboard Diagram
Make connections as shown in the figure.
RGB: j25, j26, j27, j28
Resistor: f25 and d25
Resistor: f27 and d27
Resistor: f28 and d28

Jumper wire (red): PIN11 (Arduino) and a25 (breadboard)
Jumper wire (green): PIN10 (Arduino) and a27 (breadboard)
Jumper wire (blue): PIN9 (Arduino) and a28 (breadboard)
Jumper wire (black): h26 (breadboard) and GND
Working with rgb 9a4hlailej

Comments

Similar projects you might like

LED Emergency Lights using WS2812 RGB LED Module

Project tutorial by bigboystoys13

  • 14,009 views
  • 7 comments
  • 33 respects

How to Use an RGB LED

by MisterBotBreak

  • 5,392 views
  • 0 comments
  • 20 respects

Not Your Typical RGB LED

by Alexander Vaughn

  • 2,868 views
  • 1 comment
  • 11 respects

12v RGB LED with Arduino

by Najad

  • 4,005 views
  • 1 comment
  • 21 respects

Kids RGB LED Star Nightlight

Project tutorial by Unexpected Maker

  • 3,180 views
  • 1 comment
  • 16 respects

RGB LED Fading Arduino Library

Project in progress by tinkersprojects

  • 3,013 views
  • 1 comment
  • 5 respects
Add projectSign up / Login