Blinking various LEDs using ArraysWe have already discussed how to blink a single LED, two LEDs, and LEDs using a loop, in previous topics. Here, we will discuss a project to blink five LEDs using array. All the five LEDs will light one after the other. Hardware RequiredThe components required for the project are listed below:
We can use any color LED as per our choice. PrincipleWe will connect the five LEDs to pins 13, 12, 8, 4, and 2 of the Arduino board. The required resistance of the resistors is enough to light up an LED without damaging the board and other components. The LED arranged one after another will light up. We can also change or rearrange the LEDs connected to the specified pin number on the board. Structure of the projectThe structure clearly shows the UNO board's pinout, and the five LEDs with resistors in series are connected to the board. It is shown below: ConnectionThe connection of the above project is discussed below:
SketchThe code to light the five LEDs 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 loop |