blackpanda856
Published © GPL3+

3 Led Effects Using Arduino Uno

Hey friends in this tutorial I'm going to show you how to make different patterns with 3 LED's using Arduino Uno. This is a simple project.

BeginnerFull instructions provided4,690
3 Led Effects Using Arduino Uno

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
5 mm LED: Green
5 mm LED: Green
×3
Resistor 1k ohm
Resistor 1k ohm
X3 / X1 (Explanation is in the tutorial. Read above sentences)
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×4
Male/Male Jumper Wires
Extra jumper wires to connect led cathode's together.
×3

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Assemble your circuit by referring to this Circuit Diagram

Code

Download or copy paste this code in your Arduino IDE

C/C++
Copy and paste this code in your Arduino IDE or download this code file and open it with your Arduino IDE.
//Coded by Jevins Annson of J4 Jevins
//Subscribe To J4 Jevins Youtube :- https://www.youtube.com/J4Jevins

const int FirstLed = 5;
const int SecondLed = 6;
const int ThirdLed = 7;
int counter;
  
void setup() {
  
  pinMode (FirstLed, OUTPUT);
  pinMode (SecondLed, OUTPUT);
  pinMode (ThirdLed, OUTPUT);
}

void loop() {

  
    for (counter = 0; counter < 5; ++counter) {

        digitalWrite (FirstLed, HIGH);
        delay (500);
        digitalWrite (SecondLed, HIGH);
        delay (1000);
        digitalWrite (FirstLed, LOW);
        delay (500);
        digitalWrite (ThirdLed, HIGH);
        delay (1000);
        digitalWrite (SecondLed, LOW);
        delay(500);
        digitalWrite (ThirdLed, LOW);

  }


        for (counter = 0; counter < 5; ++counter) {

        digitalWrite (FirstLed, HIGH);
        delay (500);
        digitalWrite (SecondLed, HIGH);
        delay (1000);
        digitalWrite (ThirdLed, HIGH);
        delay (500);
        digitalWrite (FirstLed, LOW);
        delay (1000);
        digitalWrite (SecondLed,LOW);
        delay (500);
        digitalWrite (ThirdLed,LOW);
            
      }

      for (counter = 0; counter < 5; ++counter) {

        digitalWrite (ThirdLed, HIGH);
        delay (500);
        digitalWrite (SecondLed, HIGH);
        delay (1000);
        digitalWrite (FirstLed, HIGH);
        delay (500);
        digitalWrite (ThirdLed, LOW);
        delay (1000);
        digitalWrite (SecondLed,LOW);
        delay (500);
        digitalWrite (FirstLed,LOW);
 
      }

       for (counter = 0; counter < 50; ++counter) {

        digitalWrite (ThirdLed, HIGH);
        delay (100);
        digitalWrite (SecondLed, HIGH);
        delay (100);
        digitalWrite (FirstLed, HIGH);
        delay (100);
        digitalWrite (ThirdLed, LOW);
        delay (100);
        digitalWrite (SecondLed,LOW);
        delay (100);
        digitalWrite (FirstLed,LOW);

       }

       for (counter = 0; counter < 50; ++counter) {


        digitalWrite (FirstLed, HIGH);
        delay (100);
        digitalWrite (SecondLed, HIGH);
        delay (100);
        digitalWrite (ThirdLed, HIGH);
        delay (100);
        digitalWrite (FirstLed, LOW);
        delay (100);
        digitalWrite (SecondLed,LOW);
        delay (100);
        digitalWrite (ThirdLed,LOW);
      }    
}

Credits

blackpanda856

blackpanda856

2 projects • 4 followers

Comments