Sunday 28 February 2016

Blinking LED with Arduino Nano

Hello friends,
Seeing a blinking LED is so much fun, but when you make one like that by yourself then the fun is even more. ^_^

So, let the fun begin,

In this tutorial, I have shown below how to blink an LED with Arduino Nano.

Note: Using an LED without a resistor will blow led.
Things you will need.
  1. Arduino Nano
  2. A breadboard
  3. A LED ( I used 3V at 20mA led)
  4. A resistor 100 ohm

Step 1: Wiring.

 

You have to attach the LED to the Nano just done in the above image.

  • Connect LED's positive end to the one end of the resistor
  • Another end to Nano's digital pin 13
  • Negative end to Nano's ground.

To power the Nano board, you can use a USB cable or you can also connect an external power supply by connecting the positive pin to VIN and negative to the ground.


Step 2 : Coding


// 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 } 
 
 Coding for blinking LED is so simple.
  • Just connect Nano to PC.
  • Open Arduino IDE software.
  • Go to File > Examples > Basics > Blink.
  • And upload it to the Nano board.
  • In no time, the LED should be Blink. 
  • 1 second On, 1 second OFF.

If you have any questions you can ask me in the comment section below. ^_^ 

1 comment:

  1. I enjoyed reading this blog. in my opinion, everything was perfectly written there as well as few small tips are also can be taken as healthy suggestion. Descriptive informative content written in this blog is very useful.หลอด led

    ReplyDelete