0% found this document useful (0 votes)
46 views6 pages

CP323L - Experiment 1

This document discusses an Arduino experiment on microprocessor systems. The experiment involves using an Arduino Uno microcontroller to program different lighting patterns for LEDs using code. Students will connect LEDs, switches, and an Arduino board on a breadboard. They will write code to light LEDs in various combinations when switches are pressed and test the code. The objectives are to use delay functions in Arduino code and produce alternating and combined LED blinking patterns with switches.

Uploaded by

2101249
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)
46 views6 pages

CP323L - Experiment 1

This document discusses an Arduino experiment on microprocessor systems. The experiment involves using an Arduino Uno microcontroller to program different lighting patterns for LEDs using code. Students will connect LEDs, switches, and an Arduino board on a breadboard. They will write code to light LEDs in various combinations when switches are pressed and test the code. The objectives are to use delay functions in Arduino code and produce alternating and combined LED blinking patterns with switches.

Uploaded by

2101249
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/ 6

UNIVERSITY OF BATANGAS – LIPA CAMPUS

COLLEGE OF ENGINEERING AND ARCHITECTURE


COMPUTER ENGINEERING

INTRODUCTION IN ARDUINO

Experiment #1
MICROPROCESSOR SYSTEMS

NAME:
STUDENT NUMBER:
DATE OF SUBMISSION:

PROFESSOR

Computer Engineering - CP323L


Discussion:
• An open-source hardware platform based on an Atmel AVR 8-bit microcontroller
and a C++ based IDE
• Delays are used to synchronize events, or read inputs with a specific sampling
frequency (more on Bus/Wait I/O)
• Serial.println(value);
Prints the value to the Serial Monitor on your computer
• pinMode(pin, mode);
Configures a digital pin to read (input) or write (output) a digital value
• digitalRead(pin);
Reads a digital value (HIGH or LOW) on a pin set for input
• digitalWrite(pin, value);
Writes the digital value (HIGH or LOW) to a pin set for output

To access their documentation and support for the Microcontroller, visit the website
https://www.arduino.cc/en/Tutorial/HomePage

Objectives:

At the end of this laboratory exercise, you should be able to:


1. Create a program that will be accepted by ARDUINO and able to use the
delay(); function.
2. Create a program that will show the different lighting patterns in LED.
3.

Equipment and Materials:


Computer Engineering - CP323L
The following equipment and materials are needed in performing this laboratory
exercise:
1 – DC Supply (5V-12V Output)
1 – Breadboard
1 – ARDUINO UNO
1 – LED
1 – 47 ohm to 500 ohm ¼W resistor
2 – switches
Set of Connecting Wires

Procedure:
1. Create a basic circuit diagram with 8 LEDs, 1 switch, and Arduino UNO.
2. Connect the components using the connecting wires and the breadboard.
3. Power ON the ARDUINO by connecting the USB Cable to your PC/Laptop.
4. Make sure that the ARDUINO IDE has recognized your ARDUINO UNO.
5. Try the sample code located in the File > Examples > Basic > Blinking LED.
6. Make sure that you connect your LED first on PIN 13 to be able to test the code
and its connection.
7. Document #6, and copy the code and explain each part of the code.
8. Produce the following LED lighting pattern combinations:
a. All LEDs must light ON
b. Blinking LEDs when switch is ON
c. Alternate blinking LEDs when the switch is ON

9. Add another switch (for a total of 2 switches), and 8 LEDs. Produce the following
LED Lighting Pattern Combinations:

Computer Engineering - CP323L


SWITCH 1 SWITCH 2 LED (1 – 4) LED(5 – 8)
0 0 1 1
0 1 1 0
1 0 0 1
1 1 0 0

Activity Questions:

1. Based on this activity, what does digitalWrite() manipulates? How do you initiate
it?
2. Does the current and voltage load affect the LED? Why or why not?
3. Can you implement the alternate ON/OFF of LEDs without using delay?

Computer Engineering - CP323L


Results and Discussion:

Conclusion:

Computer Engineering - CP323L


REFERENCES:
• https://store.arduino.cc/usa/arduino-uno-rev3

Computer Engineering - CP323L

You might also like