Blinking multiple LEDs using the loopWe have already discussed the method to blink a single LED and two LEDs. In this project, we will discuss the process to blink three LEDs using for loop. The three LEDs will light up one after the other. Let's start the process. Hardware RequiredThe components required for the project are listed below:
We can use any color LED as per our choice. PrincipleWe will connect the three LEDs to pins 13, 8, and 4 of the Arduino board. The limiting value of resistance should be between 220 and 330 ohms to set the optimal current through the LEDs. The required resistance is enough to light up an LED without damaging the board and the LED. We will turn the LED ON/OFF individually. Structure of the projectThe structure clearly shows the pinout of the UNO board, and the three LEDs with resistors in series are connected to the board. It is shown below: ProcedureThe connection of the above project is discussed below:
SketchOpen the Arduino IDE and start with the coding, which is given below: Connection DiagramWe will show the connection using the Simulator because the connections become clearer and more precise. We can make the same connection using the hardware devices.
Next TopicBlinking multiple LEDs using switch case
|