Parkmoonsugledel
Published © CC BY-NC-SA

Try Using an RGB LED

After learning how to use the LED, I learned how to use the RGB LED!

BeginnerShowcase (no instructions)6 minutes577
Try Using an RGB LED

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
RGB Diffused Common Cathode
RGB Diffused Common Cathode
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

RGB LED Schematics

simple...

Code

RGB LED Code

Arduino
So Easy
int led = 3;
int led1 = 4;
int led2 = 5;

void set up() {
  pinMode(led, OUTPUT);
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
}

void loop() {
  digitalWrite(led, HIGH);
  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  delay(500);
  digitalWrite(led, LOW);
  digitalWrite(led1, HIGH);
  digitalWrite(led2, LOW);
  delay(500);
  digitalWrite(led, LOW);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(500);
}
  

Credits

Parkmoonsu
1 project • 6 followers
A Korean high school student who wants to learn about Arduino!
gledel
100 projects • 117 followers
Looking back on my childhood, I was happy when I was making something and I was proud of myself. "Making is instinct!"

Comments