Thursday, 18 August 2016

Basic Adruino Tutorial: Blinking light



In this tutorial. I'm going to show you how to make simple code for adruino, which will make an LED connected to it flash from off to on. with 1 second interval.



Step 1: What you'll need

  • An Adruino board (it can be any, but this tutorial uses an UNO (R3) board)  Amazon
  • USB cable to power adruino 
  • 330 Ω Resistor
  • 3 x cables
  • 1 x LED
  • Adruino IDE (Installed and configure) 
  • 1 x Breadboard Amazon

Step 2: Making connection between breadboard and Adruino

uno_03

  • Firstly plug one end of a wire into '5v' Power output on the Adruino, and other end into positive section of breadboard.
  • Then you need to plug one end of a wire into the ground ('GND') of the Adruino, and the other end into negative section of the breadboard.
  • Then you need to plug one end of the resistor from the negative section of breadboard, to any horizontal line on main section. (NOTE - It is very important to use At least 330 ohm resistor with this circuit. If you don't then you will almost certainly blow LED
  • Finally, Attach a wire from digital port '12' on your Adruino to the hole directly above the resistor on breadboard. 

Step 3: Attaching LED


Now to attach Led into the circuit, You have to connect the Longer pin of LED next to the wire connected to the digital port of Adruino, and the shorter pin next to the resistor.

Step 5: Plug into the computer

Now you need to plug the Adruino board into the computer. Just make sure you don't break your circuit.

Step 6: Make the code


Just copy the code as it is and compile it, and upload it onto your adruino.

Step 7: And Done

Once the code is uploaded, if you have done everything right, the LED should flash. It will do that for as long as the device is plugged in.

Hope you enjoyed the tutorial, keep  visiting my blog for more Adruino tutorials.

No comments:

Post a Comment