
Today, we are formally starting our journey towards automation, IoT, and robotics. We will use different tools and modules in this process. Our journey will include but not be limited to Arduino, Raspberry Pi, ESP 8266, PLC, etc. In this article “How to control Led with Arduino” we will cover the basics using Arduino. To check the comparison between Arduino and Raspberry Pi, follow the link “Raspberry & Arduino Comparision”.
Contents
In this starting tutorial, we shall go through the basics level of programming with a very basic level of components i.e. Led and Resistor. We will learn how to wire Led with Arduino. How to control led with Arduino. How to control the flashing speed of LED. This also includes a very basic level of software programming of Arduino UNO and most importantly first-hand experience of Arduino hardware. If you want to learn the basics of Arduino UNO, Click here
Parts Required

- Arduino UNO (Any Arduino Model can work)
- Bread Board
- LED (Any Color)
- Resistor (100 Ohms)
- Jumper Wires
A breadboard is ideal for initial testing and working of hobbyist and research work. You can directly connect this component with Arduino or you can solder these components. However, it is highly recommended to test your project for any bug by testing on the breadboard.
We use the Yellow LED in this project. You can use any color of LED for you. The voltage applied to this circuit through Arduino is 5 V. If we apply these 5V directly to LED, LED will burn out. We will limit voltage by using a 100 Ohm resistor.
You can use commercially available jumper wires for connecting things. Make sure that it should fit in breadboard holes.
Making Circuit

- Place LED on breadboard carefully. Properly insert its lids in holes of the breadboard.
- Place 100 Ohm Resistor in series with our LED.
- First of all connect take a jumper wire and connect any ground pin of Arduino with a ground rail of the breadboard.

4. Connect any digital pin with a positive rail of the breadboard.
5. Connect the cathode of the LED with the ground rail.
6. Connect the remaining end of the Resistor with a Positive rail.
(Note: You can directly connect the ground of Arduino with the cathode of LED and Pin8 with a resistor. However, such practice is not recommended as in the future with more components on the breadboard, it will not possible to connect pins directly with all components).

7. Recheck the circuit.
8. Now power up Arduino.
9. You will see the flashing of our LED. It will be turned ON for 1 second and turn OFF for 1 second. All this is written in our code which I shall explain in the next few lines.


Software Part of “How to control Led with Arduino”
Double Click to open the Arduino IDE on your laptop / PC and follow the below steps.
- Go to tools and then select Arduino Board you are using and also the port of the Arduino board.
- A new sketch will open. Save it with any name and location.
- Now, write the below code in it.
int led=8; // Name GPIO Pin no 8 with a variable led and it is an integer type.
void setup() {
// put your setup code here, to run once:
pinMode(led,OUTPUT); //Setting LED as output
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite (led, HIGH); //Keeping LED High (ON) initially.
delay (1000); // Delay of 1000 millisecond ie 1 Second and then to next instruction.
digitalWrite (led, LOW); //Now, making LED LOW.
delay (1000); // Keeping it OFF for ON Second and then back to ON status.
}

Conclusion of In this article “How to control Led with Arduino”
That’s the end of this very basic level simple experiment. Hope you fully understand the whole blog. It is the beginning of a series of blogs on this topic; we will integrate videos with it in the future. In case of any query or any issue, you can comment or you can directly email me at the following address: contactus@automationcraze.com. Your participation will be highly appreciated. I am my team always be there in case you need any help.
Regards
Team https://automationcraze.com
James
Found your blog thru facebook groups. Yeah, I’m a beginner in arduino and found it to be such a fascinating hobby. I’ve gone thru some of the basics and is now jumping towards exploring the ESP8266 & the ESP32.
Please do a post on ESP32. It’s so far the most awesome arduino board I’ve ever seen.
Thanks.
admin
Thanks, My next target is NodeMCU, ESP8266 and Raspberry Pi.
Again thanks and Regards.
Admin
Wilbur
What’s up Dear, are you truly visiting this site regularly,
if so then you will absolutely obtain good experience.
admin
yes
Sammy
With havin so much content do you ever run into any problems of
plagorism or copyright infringement? My blog has a lot of unique content I’ve
either written myself or outsourced but it looks like a lot of it is popping it up all over
the web without my authorization. Do you know any ways to help stop content from being stolen? I’d definitely
appreciate it.
admin
Google do it for us.
Thanks for comments.
Regards
Admin
Jay
Spot on with this write-up, I seriously think this website needs a
great deal more attention. I’ll probably be returning to see more, thanks for the info!
Social Media Marketing
Wow, awesome weblog structure! How long have you ever been blogging for? you make blogging look easy. The whole look of your site is magnificent, let alone the content!!
Money Online
Wow, amazing blog layout! How long have you ever been blogging for? you made running a blog look easy. The overall look of your website is great, let alone the content!!