0% found this document useful (0 votes)
25 views3 pages

COMPTECH 315 BIT III B Module 01 LED DISPLAY Part 3 Ken

The document discusses a microprocessor circuit project using an Arduino Uno board and LEDs. It includes the learning objectives, component list, circuit diagram, Arduino code, and information about the student and instructor for the project.

Uploaded by

ken340569
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views3 pages

COMPTECH 315 BIT III B Module 01 LED DISPLAY Part 3 Ken

The document discusses a microprocessor circuit project using an Arduino Uno board and LEDs. It includes the learning objectives, component list, circuit diagram, Arduino code, and information about the student and instructor for the project.

Uploaded by

ken340569
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Republic of the Philippines

CEBU TECHNOLOGICAL UNIVERSITY


NAGA EXTENSION CAMPUS
Central Poblacion, City of Naga, Cebu, Philippines
Website: http://www.ctu.edu.ph E-mail: [email protected]
Phone: +6332 417 0418

COLLEGE OF TECHNOLOGY

MIS Code : __________ Schedule : 01:00 PM-04:00 PM MON-FRI

Course Subject : COMPTECH 315 (Microprocessor System) Room No. : Room 311

Curriculum : BIT-COMPTECH Instructor : AL D. HORTEZA, LPT, Ph.D.

Semester : 1st Semester Academic Year : AY 2023-2024

MODULE 01
LED DISPLAY – PART 3

LEARNING OBJECTIVES:
 To construct a microprocessor/microcontroller circuit using Arduino Uno with resistors and light-
emitting diodes (LEDs) as output components.
 To program a microprocessor/microcontroller circuit based on the required output. In this module, the
required output is to light the LEDs in the following manner:
 Left-To-Right, then OFF
 Right-To-Left, then OFF
 Both Sides-To-Center, then OFF
 Center-To-Both Sides, then CYCLE

LIST OF COMPONENTS:

Item No. Item Description Quantity


1 Breadboard 1 pc
2 Arduino UNO R3 1 pc
3 330 ohms 1/4W Resistor 8 pcs
4 Light-Emitting Diodes (LEDs) 8 pcs
5 AWG #22 Solid Wire

CIRCUIT DIAGRAM:
Republic of the Philippines
CEBU TECHNOLOGICAL UNIVERSITY
NAGA EXTENSION CAMPUS
Central Poblacion, City of Naga, Cebu, Philippines
Website: http://www.ctu.edu.ph E-mail: [email protected]
Phone: +6332 417 0418

COLLEGE OF TECHNOLOGY
SOURCE CODE:

int i,temp;
int displayLED1[8]={2, 3, 4, 5, 6, 7, 8, 9}; for(i=0;i<8;i++)
int displayLED2[8]={2, 3, 4, 5, 6, 7, 8, 9}; digitalWrite(displayLED1[i], LOW);
int displayLED3[8]={2, 3, 4, 5, 6, 7, 8, 9}; delay(300);

void setup() { temp = 7;


for(i=0;i<8;i++); for(i=0;i<4;i++) {
pinMode(displayLED1[i], OUTPUT); digitalWrite(displayLED2[i], HIGH);
} digitalWrite(displayLED3[temp], HIGH);
delay(300);
void loop() { digitalWrite(displayLED2[i], LOW);
digitalWrite(displayLED3[temp], LOW);
for(i=0;i<8;i++) temp--;
digitalWrite(displayLED1[i], LOW); }
delay(300);
for(i=0;i<8;i++)
for(i=0;i<8;i++) { digitalWrite(displayLED1[i], LOW);
digitalWrite(displayLED1[i], HIGH); delay(300);
delay(300);
digitalWrite(displayLED1[i], LOW); temp = 4;
} for(i=3;i>=0;i--) {
digitalWrite(displayLED2[i], HIGH);
for(i=0;i<8;i++) digitalWrite(displayLED3[temp], HIGH);
digitalWrite(displayLED1[i], LOW); delay(300);
delay(300); digitalWrite(displayLED2[i], LOW);
digitalWrite(displayLED3[temp], LOW);
for(i=7;i>=0;i--) { temp++;
digitalWrite(displayLED1[i], HIGH); }
delay(300); }
digitalWrite(displayLED1[i], LOW);
}
Republic of the Philippines
CEBU TECHNOLOGICAL UNIVERSITY
NAGA EXTENSION CAMPUS
Central Poblacion, City of Naga, Cebu, Philippines
Website: http://www.ctu.edu.ph E-mail: [email protected]
Phone: +6332 417 0418

COLLEGE OF TECHNOLOGY

Prepared and Submitted By:

KENT ADRIAN P. PARDILLO


BIT III-B Student, College of Technology
CTU-Naga Extension Campus
Central Poblacion, City of Naga, Cebu 6037 Philippines
As of First Semester, AY 2023-2024

Submitted To:

AL D. HORTEZA, LPT, Ph.D.


Associate Professor V, College of Technology
CTU-Naga Extension Campus
Central Poblacion, City of Naga, Cebu 6037 Philippines
As of First Semester, AY 2023-2024

Date Submitted : ____________________

Date Checked : ____________________

You might also like