top of page

Blinking An Led using the Arduino

In this tutorial, I'm going to show you how to make a simple circuit/code with an arduino, which will make an LED connected to it flash from off to on, with 1-second intervals, as shown below. 


ITEMS REQUIRED

1 x LED

3 x Cables

1 x 330 Ω Resistor

1 x Arduino board

1 x USB cable

1 x Computer with Arduino software installed (http://www.arduino.cc/en/Main/software if you haven't already got it)

1 x Breadboard





 

STEP 1:Connect the circuit as per circuit diagram.


Connect the led's positive pin to pin number 13 of the arduino and the negative end to the resistor(make sure the resistor is atleast 330ohms)and connect it to gnd pin of the arduino. 

 

STEP 2: PLUG IN TO YOUR COMPUTER

Connect the arduino to the pc using the usb cable.

 

STEP3.OPEN THE ARDUINO IDE

click on file--->new sketch and type the following program

int led=13; void setup() {   // initialize digital pin LED_BUILTIN as an output.   pinMode(led, OUTPUT); }

// the loop function runs over and over again forever void loop() {   digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)   delay(1000);                       // wait for a second   digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW   delay(1000);                       // wait for a second }


 

STEP4.UPLOAD

click on verify and upload





You have your first arduino code up and running.Do visit the page for beginner tutorials.

You can buy your arduino from the below link.

54 views

Comments


bottom of page