Two Led Application with Arduino
Two Led Application with Arduino

Two Led Application with Arduino

AliExpress WW
AliExpress WW
In this application, we will use two digital output pins of the Arduino UNO board. These pins are pins 13 and 12. We will set these pins as output pins using the pnMode command.
A 1K resistor and LED are connected to each pin. Here's what we need to remember: We can draw a maximum of 40 mA from each of the digital outputs. Since we are connecting a 1K resistor, this means we will not draw maximum current.
Desired delay can be achieved with the “delay” command. The LEDs can be made to burn faster or slower.

 

void setup()
{
  pinMode(13, OUTPUT);
    pinMode(12, OUTPUT);
 }
 
void loop()
{
  digitalWrite(13, HIGH);
  delay(100); // Wait for 100 millisecond(s)
  digitalWrite(13, LOW);
  delay(100); // Wait for 100 millisecond(s)
 
   digitalWrite(12, HIGH);
  delay(100); // Wait for 100 millisecond(s)
  digitalWrite(12, LOW);
  delay(100); // Wait for 100 millisecond(s)
}

Youtube video below

 

10Pcs Multicolor 4pin 10mm RGB Led Diode Light Lamp Tricolor Round Common Anode/Cathode LED Light Emitting Diode Red Green Blue

AliExpress WW