Monday, February 4, 2019

LED Chaser Using Arduino

LED Chaser

Hello guys...
This is our first Project With Arduino. Today we are making LED Chaser using simple steps. But first, we have to know what is LED Chaser? LED Chaser is a phenomenon in which many LEDs (Light Emitting Diodes) or electric blues are connected in a series or in a string and they are Frequently ON and OFF to give or show the illusion that is moving in the direction. The direction of moving of LEDs purely depends upon you like in which direction you want to move the LEDs it is done by just doing some change in the Program. The best example of LED Chaser is normally seen in the shops in which they are set those types of LED Chaser to Attracts the customers or to showing there shop's Name.   

You can use this LED Chaser Project for your Home Decoration.







Hardware Components Used

  1. Arduino Uno R3                            
  2. 5mm LEDs
  3. Full-Size Breadboard                     
  4. Male to Male Jumper Wires 
  5. 220-ohm resistor            

Software Used

Steps.

  1. Take LEDs and plugged all LEDs on to the Breadboard in series.
  2. Now give the common GND supply to all the short leg(-ve) of the LEDs in Breadboard.
  3. Then connect the positive leg of all the LEDs with Arduino board as per pin No's. that mentioned in the Program with the help of Jumper wires.
  4. Now, in Arduino IDE software connect the Arduino board with PC using a USB cable.
  5. Check for the Board (Tools>Board>Arduino Uno).
  6. Check for the COM port (Tools>Serial port>COM).
  7. And upload the Program.

Your LED Chaser is Ready...

And you can also Modify your Chaser by just changing the program.

Enjoy...

Schematics.

led chaser


Code.




Code Discription:-



Here, the very first thing to do while writing your program you have to define the Integer 'int' in this we have to declare the PINs like here we declare pin 13 to pin 4 for LED 1 to LED 10.



void setup
In void setup, we have to declare the pinMode like which pin acts as an INPUT or which pin acts as an OUTPUT like in this code we need output though the LEDs so we write (LED, OUTPUT) that means the pin by which the LED is connected acts as an OUTPUT pin.



void loop
The void loop is basically used to run the program in a loop that means it repeats itself. Here we write digitalWrite(LED1, HIGH); to give the high signal (i.e., 1) to turn ON the LED.
And we use delay(100); to wait for 1 milli sec and then write digitalWrite(LED, LOW); to give the LOW signal (i.e., 0) to turn OFF the LED and again delay for 1 milli sec.


Note that it is Case-sensitive so you should write each and every thing same as shown.

No comments:

Post a Comment