How to make an led light up and blink using Arduino

   How to make an LED light up and blink using Arduino

 

        Hello guys, This is my second article in the Arduino tutorial. Thanks so much for reading my articles. In the last article, I presented a full article about Arduino. I hope you have read it. So let’s go to today’s post. This tutorial includes how to make an led light up and blink using Arduino.

So First, let’s see what the Arduino language is. This language is essential for giving commands to the Arduino board or to perform any task. It’s a very easy language for learning. This language is based on C and C ++ high-level computer languages. It’s is the same as the English language. We will continue to learn this language step by step.OK let’s go to our first project.

  For this project for I’m using the Arduino UNO board. Arduino UNO board is very good for this project and its low-cost board. In this project, I will present how to blink the LED bulb using Arduino. How to do it step by step is explained in detail below. The materials needed to carry out this project and the links where they can be purchased are given below.

Components

Step 1

Arduino UNO board
LED bulb

Step 2

Connect the LED bulb to the Arduino board as shown below.

    Connect the anode pin of the LED bulb to the 13 pins of the Arduino board and the cathode pin to the GND pin. The GND pins on the Arduino board can be considered cathode pins. You must remember it.

Step 3

Connect the Arduino board to your computer using the USB cable.

Step 4

Run the Arduino IDE on your computer. Let’s talk about the Arduino IDE interface.
 
what is the void setup ()    

    The void setup is a function. It includes activities that only need to be done once. For example, To inform the pin Arduino board we use.

What is the void loop ()

    The void loop is a function. It includes This function includes things that are done continuously. For example, the Continuous blink of the LED bulb.

Step 5

 

Let’s see step by step what the code is?

pinMode(13,OUTPUT);
This code informs the Arduino board of the PIN required for our project. The 13th pin is a digital pin. You must remember to apply a semicolon to the end of the code line.
digitalWrite(13,HIGH);
This code line supplies 5 volts for the 13th pin. Then the LED bulb is ON.
delay(500);
This code line informs the Arduino board of the time delay at which the LED bulb should light up. Let it know in milliseconds.
digitalWrite(13,LOW);
This code line supplies 0 volts for the 13th pin. Then the LED bulb is off.
 
delay(500);
This code line informs the Arduino board of the time delay at which the LED bulb has turned off.

Step 6

Verify this code.

Step 7

Select the Arduino board.
Select port

Step 8

OK, the last step. Upload this code.

 
Good job, Everything has done. Enjoy this project. Watch the video below.

I hope you have learned something from this article. So, see you in the next blog post. Bye. have a good day.

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Scroll to Top