DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Led Circuit Using Arduino
projectiot123
projectiot123

Posted on • Updated on

Led Circuit Using Arduino

Loop Iteration Circuit Using Arduino
Hi Fellows! During this project, we'll discuss the method to blink LEDs victimization for loop. The LEDs can light one when the opposite. The LEDS square measure turned on and off, in sequence, by victimization Arduino Module. Let's begin the method.

Introduction:

There square measure few functions therefore helpful that you just realize them all over. For loop is one among those functions. A for loop repeats associate degree action for a range of iterations, reducing the lines of code that require to be written so creating the programmer’s life easier. In this tutorial, six LEDs square measure interfaced to the Arduino Uno. This can be not sophisticated it's a bit like interfacing one light-emitting diode to the Arduino Library for Proteus
.

Principle:

We will connect the six LEDs to pins two, 3, 4, 5, 6, and seven of the Arduino. The limiting worth of resistance ought to be between 220 ohms to line the best current through the LEDs. The desired resistance is enough to light associate degree light-emitting diode while not damaging the Arduino and therefore the light-emitting diode. We’ll flip the light-emitting diode ON/OFF one by one.

Components Required:

Arduino
LED
Resistor

Circuit Connection:

Alt Text

  1. Attach one leg of a resistor into Arduino pin 2; attach the other leg into a line on the LED.
  2. Now attach a resistor to Arduino pin 3, and other leg in a line on a LED.
  3. Now attach a resistor to Arduino pin 4, and put the other leg in a line on a LED.
  4. Now attach a resistor to Arduino pin 5, and put the other leg in a line on a LED.
  5. Now attach a resistor to Arduino pin 6, and put the other leg in a line on a LED.
  6. Now attach a resistor to Arduino pin 7, and put the other leg in a line on a LED.
  7. Now connect all the led in series and connect them to Arduino pin 13 for ground.
  8. Connect an LED in the same manner.
  9. Connect the Arduino to your computer for coding. ## Working: OK, currently you're able to run our code. If you probably did it properly, it ought to run, and blink the light-emitting diode one times, so blink the opposite light-emitting diode just one occasion. Our objective during this exercise is to be ready to severally management the LED’s. We’ll wish to blink the light-emitting diode one times during a row, so blink the opposite one once. A β€œblink” ought to be turning light-emitting diode on, going away it on for 1 / 4 second, turning it off, and going away it off for 1 / 4 second. Then that sequence is going to be recurrent. ## Application: β€― β€’ Always use a current-limiting resistor β€’ Remember your electrical device color codes β€’ 220-470 ohm square measure smart, all-purpose values for LEDs β€’ Drive from Arduino on digital pins β€’ Use PWM pins if you wish to use analog Write for dimming OK, hopefully you get pleasure from this tutorial. See you later. Smart bye and rejoice.

Top comments (0)

Become a Moderator Do you want us to help make DEV a better place?

Fill out this survey and help us by becoming a tag moderator here at DEV.