Arduino blinking LED project

AR-B1: Blinking LED Project using Arduino

This entry is part 1 of 13 in the series Arduino Basic Circuits

This code is used to blink the LED connected at pin-13 (LED_BUILTIN). This LED is marked as “L” on the Arduino UNO board. First type the code by creating new file in Arduino IDEWhat is Arduino IDE? Arduino IDE stands for Integrated Development Environment. It is also called as Arduino software in general language or Arduino compiler. It is used to convert high level programming language like C/C++ program into machine code i.e. into low level language., save the file and then upload it.

Required Material

Arduino UNO Board – 1, data cable – 1, Computer / Laptop – 1.

Working

When the given code is uploaded to the Arduino UNO board, the built-in LED connected at pin-13 starts blinking at a rate decided by delay() function. If you type delay(1000); it will blink at 1 second rate. If you type delay(2000); it will blink for 2 seconds and so on.

The Code

int LED = 13;

void setup()
{
  pinMode(LED,OUTPUT);
}

void loop()
{
  digitalWrite(LED,HIGH);
  delay(100);
  digitalWrite(LED,LOW);
  delay(100);
}

Procedure & Precautions

  1. First type the code correctly in Arduino IDE software.
  2. Then connect the Arduino board to computer through data cable and click on “Tools” menu.
  3. Then select “Arduino board” and respective “COM” Port.
  4. The upload the code in Arduino UNO board.
  5. Observe that the LED “L” on Arduino UNO board is blinking at a rate decided by your delay() function value.
image 18 Vidyasagar Academy Akola
Share on your network!
Yash Vidyasagar
Yash Vidyasagar

Professor in CS, Fergusson College, Pune. Researcher in Embedded Systems, Expert in Online/Offline Education, Creator of lots of projects for community solutions... ➤➤

Leave a Reply

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