November 9, 2016

Blinking a led using Arduino UNO



BLINKING A LED USING ARDUINO UNO

INTRODUCTION
Arduino is a micro-controller which can be programmed to do certain operations like lighting led, controlling servo, etc. We’ll use Arduino UNO or any other clone for performing this blinking experiment. Blinking a led in simple definition means turning the led ON and OFF within a finite (small) time interval. The time interval must be less than one second in order to experience the blinking of led.

MATERIALS REQUIRED

  • Arduino UNO or any other clone and USB cable

  • 5mm LED

  • 20 K ohm resistor

  • Breadboard

  • Jumpers


PROCEDURE

  • Connect any digital pin of Arduino to longer leg of led via a resistor.

  • Now connect the shorter leg of led to ground pin on Arduino.

  • The circuit is complete, upload the code and you can verify the output.

  • The USB cable serves both as a medium to upload code as well as 5V power source.


CODE

  • The code for blinking led is available in basics library in Arduino IDE.

  • You can select the digital pin you want to use. Also you can vary the delay time which will change your blink output.

  • In this example the delay time is 300millisecond.

No comments:

Post a Comment