LIGHT UP LED USING ARDUINO UNO

To light up an led we just need a DC power source and ground terminal here we connect led anode terminal (+) to pin number (digital IO) 13 so that if we program our code as pin number 13 as HIGH (+5V), it behaves as power source and Cathode terminal (–) of led to the ground terminal of Arduino so that the circuit will get complete. After doing this if we give power to Arduino Uno then it will light up led (after programming MCU).

Required hardware or components for Lighting up LED using Arduino

S.N.ComponentQuantity
1.Arduino Uno1
2.Breadboard1
3.LED1
4.Resistor 220 or 280 ohm1

Circuit Diagram

Light up led using arduino circuit diagram
Light up led using Arduino – Circuit diagram
S.N.ArduinoLED
1.13Anode (+)
2.GNDCathode (-)

Programming Code: Light up Led using Arduino uno

void setup() {
  pinMode(13, OUTPUT);
}
void loop() {
  digitalWrite(13, HIGH);
}

Read Next: Led blinking using Arduino Uno

Code Explanation

Step-1: In setup function we decide the mode of digital pins either as INPUT or OUTPUT. Let concentrates on output for now.
Function pinMode( ) ” is used to define the pin working mode as an input/output.
In this function we have to pass two argument – 

  1. First one is pin number and
  2. Second is its mode, pinmode(pinNumber, mode)

In this we set pin number 13 as output: pinmode(13, OUTPUT).

void setup() {
  pinMode(13, OUTPUT);
}

Step-2: In loop function we are using one inbuilt functions that is digitalWrite( ).
Function “digitalWrite( )” is used to instruct the controller/Arduino to set the state of particular digital pin as either LOW or HIGH.
In digitalWrite( ) function we also pass two argument – 

  1. First one is pin number and
  2. Second is its state, digitalWrite(pinNumber, state).

In this we set pin number 13 output as HIGH: digitalWrite(13, HIGH).

void loop() {
  digitalWrite(13, HIGH);
}

And the loop gets executed continuously and led remains HIGH all the time.

Read Next: Led blinking using Arduino Uno

45
Leave a Reply

avatar
35 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
36 Comment authors
adminketo diet and nutrition blogBuy CBD Productsrajaqq77rajaqq Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
tien len mien nam truc tuyen
Guest

95187 309356This really is a excellent common sense write-up. Quite beneficial to 1 who is just finding the resouces about this part. It will surely support educate me. 563578

12bet
Guest

177278 891544Theres noticeably a bundle to find out about this. I assume you made certain great points in features also. 406944

facelifts
Guest

759662 107690We are a group of volunteers and opening a new system in our community. Your web web site given us with valuable information to function on. Youve done an impressive job and our entire community will be grateful to you. 456650

bong ro truc tuyen
Guest

516080 486164An intriguing discussion is worth comment. Im certain which you basically write regarding this subject, might possibly not be considered a taboo topic but typically persons are too small to communicate on such topics. To an additional. Cheers 403630

Sooner You Realize
Guest

951588 827556Your blog is one of the much better blogs Ive came across in months. Thank you for your posts and all the greatest with your function and blog. Seeking forward to reading new entries! 679252

replicas relojes
Guest

730262 219779Spot up for this write-up, I seriously believe this web site needs a lot a lot more consideration. Ill apt to be once much more to learn additional, appreciate your that information. 601455

datasgp
Guest

825107 553927Wanted posting. Loads of exceptional writing here. I wish I saw it located the website sooner. Congrats! 388663

datasgp
Guest

475769 714251Hey there. I want to to inquire somethingis this a wordpress weblog as we are thinking about shifting more than to WP. Also did you make this theme on your personal? Thanks. 650644

cách chơi chắn vạn văn
Guest

326675 315259Hi, you used to write exceptional articles, but the last several posts have been kinda boring I miss your super writing. Past several posts are just a little out of track! 35282

طراحی سایت تهران
Guest

196321 346714conclusion which you are completely proper but a few require to be 790543

Best Real Estate
Guest

904436 840512Undoubtedly,Chilly location! We stumbled on the cover and Im your personal representative. limewire limewire 666900

social site
Guest

848979 312819I discovered your blog internet site on google and check several of your early posts. Proceed to keep up the superb operate. I just extra up your RSS feed to my MSN News Reader. In search of ahead to studying extra from you in a although! 110927

Presley
Guest

667546 829601 Its hard to find knowledgeable people on this topic, but you sound like you know what youre talking about! Thanks 790059

meja qq
Guest

539010 213862I like this post, enjoyed this one appreciate it for putting up. 537851

car window signs
Guest

223600 23481I believe other site owners ought to take this internet site as an example , extremely clean and wonderful user genial style . 898152

custom tailgate decals
Guest

711389 589681Hey there! Great stuff, please do tell us when you post once more something related! 707986

poker99
Guest

131545 781411Hey, are you having issues with your hosting? I necessary to refresh the page about million times to get the page to load. Just saying 321863

New Moon Magic
Guest

892396 885448Appreciate it for helping out, superb info. 215789

chơi xổ số trực tuyến
Guest

947875 992435Hey! I basically wish to give an enormous thumbs up for the great details youve got here on this post. I will likely be coming back to your weblog for far more soon. 336154

mejaqq pkv
Guest

149026 78049Cpr KIts quite great read you know alot about this topic i see! 851202

Arduino Tutorials with Basic Electronics: CONTENT

Translate »