Professional Documents
Culture Documents
Santhoshkumar G 382, Adhiyamaan Polytechnic College
Santhoshkumar G 382, Adhiyamaan Polytechnic College
Submitted by
SANTHOSH KUMAR G
LECTURER
382, ADHIYAMAAN POLYTECHNIC COLLEGE,
HOSUR, KRISHNAGIRI
22 JUNE 2024
Project Title: Sequential and Synchronized LED Blinking on
Arduino Uno
Objective:
Components Used:
Arduino Uno board
10 LEDs
Resistors (appropriate values for current limiting)
Breadboard and connecting wires
BLOCK DIAGRAM
Circuit Diagram:
Connect each LED's anode (positive leg) to digital pins 2 through 11 on
the Arduino Uno.
Connect each LED's cathode (negative leg) to ground through a current-
limiting resistor (typically 220 ohms to 1k ohm, depending on your
LEDs).
Program Logic:
Initialization:
Define an array of integers to hold the pin numbers of the LEDs.
Initialize each pin in the setup function as an output pin.
Sequential LED Blinking:
Loop through each LED pin in the defined array.
Turn each LED on for 1 second and then off for 9 seconds sequentially.
Simultaneous LED Blinking:
After sequential blinking, turn all LEDs on simultaneously for 2 seconds.
Then turn all LEDs off for 2 seconds.
Repeat this on-off cycle for a total of 10 seconds.
Delay:
After completing the entire sequence (sequential and simultaneous
blinking), introduce a longer delay of 20 seconds before starting the
sequence again.
void setup() {
pinMode(ledPins[i], OUTPUT);
void loop() {
for (int i = 0; i < 10; i++) { // Blink for 10 cycles (10 seconds)
digitalWrite(ledPins[j], HIGH);
digitalWrite(ledPins[j], LOW);
Delay:
o After completing both the sequential and simultaneous blinking
sequences, the program delays for 20 seconds before restarting the
loop.
This code is designed to be uploaded to an Arduino Uno using the Arduino IDE.
It will operate as described in the project report, demonstrating both sequential
and synchronized blinking effects with 10 LEDs. Adjust the delay() values as
needed to achieve desired timing and effects.
Conclusion:
This project demonstrates basic control of multiple LEDs using an Arduino Uno
microcontroller. It combines sequential and simultaneous blinking effects,
showcasing fundamental programming concepts such as loops, digital output
control, and timing using delay functions.