Ad Code

Ticker

6/recent/ticker-posts

How to blink a LED in Arduino Uno | Very easy | Very interesting | Abhicoder | Arduino

        Hey guys! Welcome back to a new post. In this post, I will show you that how to blink a led using Aurdino Uno. It is very simple and very amazing! So let's get started.

Components you need:-

  • Arduino Uno
  • Breadboard
  • jumper-wires - 2
  • LED - 1
  • 220K Resistor -1
  • Data Transfer cable
  • A battery connector (To test)


So, Here is the video for it.

Connections:-

Connection diagram 

                                                                      Download this diagram

As in the diagram, Frist takes a breadboard the connect the led on the breadboard. Before that see the LED and observe the leg of the LED, there is a short leg and a long leg. 


The long leg is called 'Anode (+)' and, the short leg 'Cathode (-)'. So, connect the resistor with the short leg as shown in the diagram. Then take a Jumper wire and connect the short leg to the GND of Arduino, and the long leg is connected to the resistor so connect the jumper wire to the end of the resistor to pin number 'D12 of Arduino'. And our circuit is completed. Now connect the Data Transfer cable to the Arduino to the pc. And now let's see the code and upload it. 

Arduino code:-
// With love by Abhicoder:- Abhinav Mishra
int ledPin=12; //definition digital 12 pins as pin to control the LED
void setup()
{
    pinMode(ledPin,OUTPUT);    //Set the digital 12 port mode, OUTPUT: Output mode
}
void loop()
{  
    digitalWrite(ledPin,HIGH); //HIGH is set to about 5V PIN12
    delay(1000);               //Set the delay time, 1000 = 1S
    digitalWrite(ledPin,LOW);  //LOW is set to about 5V PIN12
    delay(1000);               //Set the delay time, 1000 = 1S


after uploading the code this will be the result





So that is the end of this post. Hope you like this post. This is a beginner-level activity. As I am learning Arduino programming, so I wanted to share it with you. Hope you like it! And please support me to get more traffic on my website as I am bringing some awesome content like this. so please support me.
Keep visiting! 

                                                                             Thank you!   



Post a Comment

0 Comments

Ad Code