LED is Light Emitting Diode play a really necessary role within the embedded system design. A Diode is a two terminal component within which current flow from the positive direction to negative direction. During this article, we tend to find out how to interface an LED with an Arduino. Simple LED is shown in the image.
LED |
In this tutorial, I will able to show you to run three LED at the same time using your Arduino board.
Component Required:
- Arduino UNO Board
- 3 LED
- Wire
- Power Supply
Circuit diagram:
Circuit diagram of interfacing LED with Arduino board for running three led at the same time is shown below:
Circuit Diagram |
NOTE: Add a current limiting register in series with led to prevent it from damage.
Positive(anode) terminal of the LED is connected to the 11,12 and 13 pin( digital pin) of the Arduino board as shown within the circuit diagram. Negative terminal of the LED is connected to the Ground.The code is written within the Arduino IDE as shown in below:
Code |
About the program:
In this program we tend to use three digital pin 11, 12 and 13 of the Arduino board that are name as x,y,z respectively. The "void setup()" function runs once at a time within the program. In this function we tell to program that led is connected as output using the "pinMode" keyword. second function "void loop()" within the program runs over and over repeatedly.In this function we tend to write our desired code for the Arduino board.
Download:
Video:
This is a nice guide yet again Saschin!
ReplyDeleteThank You Charles . Keep Visiting :)
Delete