LED Light Blinking

LED Light Blinking

               In this Arduino Tutorial we will show you how you can make this ” Multiple LED Light Blinking “ using the Arduino Board and the Processing Development Environment. You can watch the following video or read the written tutorial below for more details.

Overview

              All you need for this Arduino tutorial is an LED (light Emitting diode) for blinking , Bread Board , Jumper Wire to connect LED’s and an Arduino Board for controlling them. You can watch the following video or read the written tutorial below.

About LED

              An LED is a small light (it stands for “light emitting diode”) that works with relatively little power (about .09 Watts).

Components needed for this Arduino Project

  1. Arduino uno/nano
  2. Led light (3 mm/5 mm)
  3. Resister 100 oh’m
  4. Bread board
  5. Jumper wire ( male )
  6. Circuit Schematics

Circuit Schematics

Building Connection

  • Connect all the grounds from LED’S with the ground of Arduino board.
  • Connect the positive pin of LED1 with pin no.13 in Arduino board.
  • Connect the positive pin of LED2 with pin no.12 in Arduino board.
  • Connect the positive pin of LED3 with pin no.11 in Arduino board.
  • Connect the positive pin of LED4 with pin no.10 in Arduino board.
  • Connect the Arduino board with laptop/computer and upload the program .

Interpretation of Code

  1. To blink the LED takes only a few lines of code. The first thing we have to do is define a variable that will hold the number of the pins that the LED’s are connected to. We don’t have to do this (we could just use the pin number throughout the code) but it makes it easier to change to a different pin. We use an integer variable (called an int).
int LED1 = 13;
int LED2 = 12;
int LED3 = 11;
int LED4 = 10;  

2. The second thing we need to do is configure as an output the pin connected to the LED’s. We do this with a call to the in Mode()function, inside of the sketch’s setup() function:

void setup(){
pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);
pinMode(LED3,OUTPUT);
pinMode(LED4,OUTPUT);
}  

3. Finally, we have to turn the LED’S on and off with the sketch’s loop() We do this with two calls to the digitalWrite()function, one with “HIGH” OR “1” to turn the LED’S on and one with “LOW” or “0” to turn the LED’S off. If we simply alternated calls to these two functions, the LED’S would turn on and off too quickly for us to see, so we add two calls to delay() to slow things down. The delay function works with MILLISECONDS, so we pass it 1000 to pause for a second.

void loop(){
digitalWrite(LED1,HIGH);
digitalWrite(LED2,HIGH);
digitalWrite(LED3,HIGH);
digitalWrite(LED4,HIGH);
delay(500);
digitalWrite(LED1,LOW);
digitalWrite(LED2,LOW);
digitalWrite(LED3,LOW);
digitalWrite(LED4,LOW);
delay(500);
}  

Source Code

int LED1 = 13;
int LED2 = 12;
int LED3 = 11;
int LED4 = 10; 
void setup(){
pinMode(LED1,OUTPUT); 
pinMode(LED2,OUTPUT); 
pinMode(LED3,OUTPUT); 
pinMode(LED4,OUTPUT); 
}

void loop(){
digitalWrite(LED1,HIGH); 
digitalWrite(LED2,HIGH);
digitalWrite(LED3,HIGH);
digitalWrite(LED4,HIGH);
delay(500);
digitalWrite(LED1,LOW);
digitalWrite(LED2,LOW);
digitalWrite(LED3,LOW);
digitalWrite(LED4,LOW);
delay(500);
}  

LPG Gas Leakage Detection using Arduino

LPG Gas Leakage Detection using Arduino Nowadays, fire accidents and blasts due to LPG gas leakage is the major problem....
Read More
Alcohol Detection using Arduino

Alcohol Detection using Arduino

Alcohol Detection using Arduino The alcohol detector sensor is specially referred to as a MQ3 sensor which detects alcohol in...
Read More
Led brightness control

Led brightness control

Led brightness control/fade LED Led brightness control Overview : With the help of Arduino UNO/nano PWM pin controlling the glow...
Read More
Obstacle Detector Robot

Obstacle Detector Robot

Obstacle Detector Robot An Obstacle Avoidance Robot is an intelligent robot, that can automatically sense and overcome obstacles on its...
Read More

Control Servo angle with BT

Control Servo angle with BT                In this Arduino Tutorial we will show you...
Read More

LED ON and OFF

LED ON and OFF               In this Arduino Tutorial we will show you how...
Read More

Simple LDR circuit

Simple LDR circuit overview : To understand the circuit and working of LDR (Light Dependent Resistor) with the help of arduino. List...
Read More
Servo Motor Interfacing

Servo Motor Interfacing

Servo Motor Interfacing            A servo motor uses servo mechanism, which is a closed loop mechanism...
Read More

LED Light Blinking

LED Light Blinking                In this Arduino Tutorial we will show you how you...
Read More
Name (required)E-mail (required)Website

Leave a Reply