Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab 12

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Department of Computer Engineering

Microprocessors and Microcontroller Interfacing Lab

Course Instructor: Dated:

Lab Engineer:

Semester

Lab 12 Open Ended Lab

Total Marks Manual Marks Obtained


Name Roll No
(35) (15) Marks (50)

Checked on: _______________________________

Signature: __________________________________
12 Open Ended Lab
Lab conduct
1. You have to perform this experiment using Arduino and its Arduino IDE.
2. You are required to work in groups; everyone must attempt to understand the language syntax and
programming.
3. In case some aspect of the lab experiment is not understood, you are advised to seek help from the
instructor, lab engineer or the TA.
4. Every student has to submit individual lab manual in printed form. Use the provided Word document
to fill the manual and convert it to PDF before printing.

Lab details
You are to write a complete Arduino program that implements a traffic light controller, controlling
two traffic lights, one in the east-west direction and one in the north- south direction. The program interfaces
with six digital output devices and an LCD to display the duration in seconds. We will use two groups of
three LEDs in place of the actual traffic lights. The block diagram of the system is as follows. The pin
number used for each Of the LEDs is shown on the figure next to its corresponding LED.

We will consider a (e.g., the durations are greatly shortened and some cases removed). The lights
should continuously operate with the durations as follows:
Note that "—" is used in the table below instead of off to make the table a bit easier to read.

You must use at least one user-defined function in your code that improves the readability of your code (in
addition to setup() and loop() of course). This is a program design decision that you need to make on your
own (please think it thorough, there will be 25% of the lab mark associated with it). For example, one
recommended such function is to control the three LEDs associated to each traffic light direction (for
example east-west one) as a group. There are a number of different ways to do this.

Use a symbolic constant for ONE_SEC (one second) and use in your code. Use symbolic constants to
associate the corresponding pin numbers of the LEDs. For example, the east-west green LED is connected to
the digital 10 pin number 0. So, you may define the following symbolic constant for it.

#define EW_GREEN 0

Hint: Use a short (but still descriptive) identifier for each of the symbolic constants. The identifier should be
all capital letters (this is a common convention for constants).
Code:
Output:
Assessment rubric for Lab
Method for assessment:
Lab reports and instructor observation during lab session.
Outcome assessed:
a. Ability to conduct experiments, as well as to analyze and interpret data (P)
b. Ability to function on multi-disciplinary teams (A)
c. Ability to use the techniques, skills, and modern engineering tools necessary for engineering practice (P)

Signature: ______________________

You might also like