Blinking The On Board LED

Component need for this project

  1. One Arduino Uno.
  2. One LED.
  3. Arduino IDE

If you don’t have an Arduino IDE don’t worry

  1. Just Goto https://www.arduino.cc/en/Main/Software
  2. Then choose Windows Installer if your operating system

is Windows else choose the suitable one according to your OS.

STEP I

Connect the Arduino Uno to your computer via data cable.

 picture1

 

 

STEP II

take a led and connect the positive leg to pin number 13 and negative to ground.

                                                                                                           

 picture2


STEP III

Write the code

Open arduino ide and go to file > example > basics > blink and open sketch or copy paste the given code bellow.

picture3

CODE

// the setup function runs once when you press reset or power the board

void setup() {

// initialize digital pin 13 as an output.

pinMode(13, OUTPUT);

}

// the loop function runs over and over again forever

void loop() {

digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)

delay(1000);              // wait for a second

digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW

delay(1000);              // wait for a second

}

STEP IV

Uplode the code

To upload the code to the Arduino Board click on the forward arrow mark on the Toolbar

picture4

picture5

Wait for few second for program to be uploaded to the board ,after that LED will START BLINKING.

Leave a comment