LED toggeling 2

02- Arduino Tutorials- Interfacing an LED || Toggling an LED || Arduino Uno

Hello everyone. Welcome back to the Blog.

In my last post on the Arduino series, I talked about the various boards out there in the market. I also talked a little about the AVR series of microcontrollers running the boards. So today we are going to build our first circuit by interfacing an external LED with the Arduino board and learn to toggle the LED with code. I am going to use an Arduino Uno R3 board as an example. But, as I mentioned in my previous post; all the boards in the Arduino development environment are platform independent. As a result, the code you write in one should be compatible with all other boards with some minor changes in the IDE. Therefore you can use any board you want.

Arduino Uno r3
Arduino Uno R3

Now to create the circuit I am going to connect a 330 ohm resistor with Pin 8 of the Arduino Uno R3 board. You can also use a 220 ohm resistor if you want. To the other end of this resistor I will connect the positive pin or the anode of the LED. The cathode or the negative pin of the LED will then be connected to the ground pin present on the left side of the Arduino board. Pin 8, which is a digital input/output pin provides a voltage of 5 Volts when it is in HIGH state. But most LEDs have a voltage rating lower than that. Hence, to protect the LED from High current surge, we connect a resistor. I have given a circuit diagram below for your reference:


Circuit Diagram:

I would ask you now to go through the video below where I explain everything I have been talking about in this post and more in details:




Shop Smart with us for Best Prices:

If you want to continue on with this series I would ask you to visit our YouTube channel and subscribe to receive continuous notifications. You can also subscribe to our Newsletter below to get email notification of each post as and when they are posted.

You can also follow us on social media platforms such as  Facebook and Twitter.

Thanks a lot for reading through this post. Feel free to follow through this series and comment your queries in the comment box below. Also feel free to contact us regarding any out of stock product and we will try to get back to you as soon as possible.