Led Flasher With Arduino

It is simple and basic arduino project. You can say it welcome/hello world project in arduino programming. In this project I will first blink on board LED of arduino and then will use off board LED.

Blinking On Board Arduino LED

Arduino is a prototyping board for embedded systems development. In this example I am using Arduino UNO board. In this board ATMega328 microcontroller is installed. On board arduino LED is connected to pin number 13. Here is the circuit with off board LED.

What Will You Need

For on board LED you need only

  1. 1 x Arduino Board
  2. 1 x USB Cable
  3. 1 x Computer with Arduino IDE installed

For off board LED you need some more parts

  1. 1 x Bread Board
  2. 1 x LED
  3. 1 x 150 Ω Resistor
  4. 3 x Jumper Wires

Software


// Define pin 13 as LED pin
const int LED = 13;

void setup() {
  // put your setup code here, to run once:

  // Set LED pin as output.
  pinMode(LED, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:

  // Set LED pin at high/5V level.
  digitalWrite(LED, HIGH);
  // Delay for 500 ms.
  delay(500);
  // Set LED pin at low/0V level.
  digitalWrite(LED, LOW);
  // Delay for 500 ms.
  delay(500);
}