Portfolio-Practical Tasks - Online

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

School of Science, Computing & Engineering Technologies

Portfolio-Practical Tasks
(Online Class)

EEE20003
Embedded Microcontrollers
Semester 2 2021
EEE20003 – Portfolio-Practical Tasks Description

Content
 Pass Borderline Task 1
 Pass Borderline Task 2
 Pass Borderline Task 3
 Pass Borderline Task 4
 Pass Borderline Task 5
 Pass Borderline Task 6
 Pass Plus Task
 Credit Task
 Distinction Task
 High Distinction Task

Your portfolio assessments contain the following items:


1. Portfolio demonstration
 Provide portfolio demonstration to your tutor for questions that require
demonstration.
 The portfolio demonstration for the weekly pass borderline task (1 to 6) must be
completed to tutor no later than your lab class time in the following week. For
example, Pass Borderline Task 1 must be submitted to your tutor at your lab class
in week 2. All tasks demonstrations need to be completed by Week 7.
 The demonstrated codes must be submitted in Week 7 as a single compressed
ZIP file, which must be named as ‘your ID-PC’. For example: 12345678-PC.zip.
2. Portfolio report
 The portfolio report covers all answers, results, pictures, codes (for questions that
do not require demonstration), and comments on the weekly tasks you have
completed.
 The portfolio must be submitted as a single PDF or Word file, which must be
named as ‘your student ID-PF’. For example: 12345678-PF.pdf.

1
EEE20003 – Portfolio-Practical Tasks Description

Pass Borderline Task 1

Topics: Programming basics


Resources: Week 1 lecture Notes and Portfolio-Practical Notes
Recommended completion: Complete in week 1
Demonstration: With tutor in lab on Week 1 & Week 2

Q1. Briefly describe what is the different between the void setup (), the void loop () and the
main () function?
Q2. Write a program that will display your name and the ID number once in the serial
monitor
Q3. Briefly describe the functions delay (), Serial.println(), Serial.begin(), pinMode().
Q4. Write a program that will display the unit number and the unit's name at the beginning of
the application and then repeatedly print (“Welcome to the lab session”) in every 2 seconds.
(Require Demonstration)
Q5. Write a program that will blink the inbuilt LED every 1 second
Q6. Write a program that will On the LED for 1 second and off the LED for 2 seconds. Make
sure that the LED is connected to pin 7. (Require Demonstration)
Q7. Briefly explain the common data types used in Arduino
Q8. Write a simple program to find out the students mark (x) belongs to Higher Distinction,
Distinction, Credit, Pass or fail. Add the screenshot for the following marks x= 45,55,60,80
(please use switch statements) (Require Demonstration)
Q9. Write a simple program that will print the values from 1 to 10 in the serial monitor using
a while loop. (Require Demonstration)
Q10.Write a program that will print your name and the student ID three times in the serial
monitor (Use for loop) (Require Demonstration)
Q11. Write a program that will generate a random number under 300 for ten time and if the
generated number is between 0-100 print A, if the generate number is 101-200 print B and if
the generated number is 201-300 print C in the serial monitor. (Use if else if statements and
for loop) (Require Demonstration)
Q12 Write a function to for multiplication, Values needed to multiply be the inputs to the
function and function should output the correct value. using the function multiply 16 x 15 and
print the correct value in the serial monitor. (Require Demonstration)

2
EEE20003 – Portfolio-Practical Tasks Description

Pass Borderline Task 2

Topics: GPIO

This includes:
 GPIO
 PWM
 Seven Segment
Resources:
 Read week 2 lecture notes and portfolio-practical notes
 Practice the examples in the note before attempting this task.
Recommend completion: Complete in week 2.
Demonstration: With tutor in lab on Week 2 & Week 3.

Q1. Connect the Arduino, write a program that will display your name and the ID number
once in the serial monitor.
Q2. Connect 2 LEDs (remember to use 270 Ohm resistors). Write code to flash LED1
every 1 second and LED2 every 2 seconds. Flashing LED duration is 50 ms.
Q3. Connect 5 LEDs (remember to use 270 Ohm resistors). Write code to take input (a
single number ranging from 1 to 5) from Serial monitor and light up the corresponding
LED. Only one LED lit up at a time. (Require Demonstration)
Q4. Write code to toggle the LED when the button is pressed. (Require Demonstration)
Q5. Write code to dim the LED until off and then glow the LED to fully bright (Use
PWM).
Q6. Write code to change the volume of the piezo buzzer based on input from Serial
monitor (Use PWM). (Require Demonstration)
Q7. Connect the seven segment LED display, write code to display number from 9 to 0
(change every 1 second). (Require Demonstration)
Q8. Connect the 4-digit seven segment LED display, write code to display “11:59”.
(Require Demonstration)

3
EEE20003 – Portfolio-Practical Tasks Description

Pass Borderline Task 3

Topics: Interface

This includes:
 GLCD – OLED Display
 NeoPixel Rings
 I2C
 LED Matrix
 DS1307 RTC

Resource:
 Read week 3 lecture note and portfolio-practical notes
 Practice the examples in the note before attempting this task.

Recommend completion: Complete in week 3.


Demonstration: With tutor in lab on Week 3 & Week 4.

Q1. Connect 3 NeoPixel Rings to Arduino Mega. Write code to develop an analog clock
display with each NeoPixel Rings presents hour, minute and second. (require demonstration)

Q2. Connect OLED display to Arduino Mega. Write code to draw Olympic Rings symbol at
center of the OLED display. (require demonstration)

Q3. Connect LED Matrix with “chain” attribute is 1 and 4 buttons with suitable resistors to
Arduino Mega. Write a code to control a dot/LED move up, down, left, and right using 4
buttons. At the beginning, the dot location will be (0,0). Only one dot/LED is displayed at
once and this dot/LED can only display within the 8x8 range. (require demonstration)

Q4. Connect OLED display and HC-SR04 Ultrasonic Distance Sensor to Arduino Mega.
Write a code to present the distance value from Ultrasonic sensor as a rectangle (height of the
rectangle will be the same while the width of the rectangle will be changed based on the
distance value). Display a certain simple text on OLED display based on the distance value:
“Safe” when the distance >= 200, “Careful” when 80 <= distance < 200 and “Too Closed”
when distance < 80. (require demonstration)

Q5. Connect DS1307 RTC and LED Matrix with “chain” attribute is 5 to Arduino Mega.
Write a code to display the current time from DS1307 RTC to LED Matrix with the speed
value is 10, pause value is 100, and text alignment is PA_CENTER. (require demonstration)

Q6. Connect NeoPixel Rings and DS1307 RTC to Arduino Mega. Write a code to create a
simple timer using DS1307 RTC and NeoPixel Rings as visualization. In the setup(), write
code to take input from serial monitor to set up the hour, minute and second for the timer.
(require demonstration)

4
EEE20003 – Portfolio-Practical Tasks Description

Pass Borderline Task 4

Topics: Analog-to-Digital converters (ADC)


This includes:
 Binary, Octal, Decimal, Hexadecimal
 Potentiometer
 Temperature sensor
 LDR

Resources:
 Read week 4 lecture note and portfolio-practical notes.
 Practice the examples in the note before attempting this task.

Recommend completion: Complete in week 4.


Demonstration: With tutor in lab on Week 4 & Week 5.

Q1. Convert the following numbers to binary, octal, and hexadecimal form: a) 1610, b) 7110.
Q2. Convert the following numbers to the binary form: a) 178, b) FB116.
Q3. Write a program that displays the correct binary representation of a user defined decimal
integer between 0 and 255 on the serial monitor. (Do not use built-in functions for this task)
(Require demonstration)
Q4. Write a program that displays the correct reading of the temperature in the immediate
surrounding of the temperature sensor in Celsius and Fahrenheit using appropriate calibration
steps on the serial monitor. (Require demonstration)
Q5. Write a program that displays the correct voltage reading from the potentiometer as you
dial it on the serial monitor. (Require demonstration)
Q6. Write a program that controls the volume of a noise from the speaker using input from the
potentiometer. (Require demonstration)
Q7. Write a program that randomly takes an integer from {0,1,2,3} where each randomly taken
integer corresponds to an index within the array of LED pins {9,10,11,12}: num “0”
corresponds to LED pin 9, num “1” corresponds to LED pin 10 and so on. You are required to
generate a specific tune with a single pitch and turn on the right LED if the potentiometer is
dialled in the correct quadrant that corresponds to the randomly taken integer value: num “0”
also corresponds to a reading between 0% and 25% of the maximum potential, num “1” also
corresponds to a reading between 25% and 50% of the maximum potential, and so on. If your
dialling on the potentiometer is incorrect, then no LED is lit, and you are required to design a

5
EEE20003 – Portfolio-Practical Tasks Description

tune of your choice consisting of varying pitches and send it out. Make sure that every tune
only lasts for a few seconds and that the outcome of whether you have correctly dialled the
potentiometer is displayed on the serial monitor. The game will then be paused for 3 seconds,
and a new round will begin. (Require demonstration)
Random Integer (index) LED Pin Voltage Range
0 9 0% - 25%
1 10 25% - 50%
2 11 50% - 75%
3 12 75% - 100%

Q8. Write a program that measures the temperature using a temperature sensor every 5
seconds while simultaneously generating a tune with varying pitches every 2 seconds from
the speaker. You are required to display values of temperature at each time of measurement
and the text “Speaker is on!” right before a tune is generated and the text “Speaker if off!”
right after the tune is turned off. Hint: Use millis() function and a “current time” versus
“previous time” structure. (Require demonstration)

6
EEE20003 – Portfolio-Practical Tasks Description

Pass Borderline Task 5

Topics: Memory – RAM, ROM & Data Storage


This includes:
 RAM and ROM
 Internal flash drive
 Array structure
Resources:
- Read week 5 lecture note and portfolio-practical notes.
- Practice the examples in the note before attempting this task.
Recommend completion: Complete in week 5.
Demonstration: With tutor in lab on Week 5 & Week 6.

Q1. How many bytes are required to display the string

a). “Hello World!”, b). “12”, and c). “My name is: ”.

Q2. Write a program that returns the byte-wise information of the user input from the Serial
monitor in the hexadecimal representation.

Q3. Create a 40-byte empty array, move the memory from another array with integer number
0-9 into it, and print every single byte in the 40-byte array once.

Q4. Create a 2 by 3 matrix with 1 -3 in the first row and 4-6 in the next. Create a function that
can print out the input array in matrix format. Display the matrix on the serial monitor using
this function.

Q5. How do we access SRAM and flash memory? When do we use SRAM and when do we
use flash memory for data storage?

Q6. Store input from the serial monitor using EEPROM and only print from EEPROM if the
single input contains exactly 9 integers every time some new characters are typed into the
serial monitor. (Require demonstration)

Q7. Write a program that turns on the LED when the push button is pressed and turns it off
when the push button is pressed again and so on. Every time the push button is pressed, the
state of LED is changed between ON and OFF. You are required to store this state of change
with EEPROM so that in the rare event of a power reset, the previous state of LED can be
restored. (Require demonstration)

7
EEE20003 – Portfolio-Practical Tasks Description

Pass Borderline Task 6

Topics: Timers and Interrupts


Resources: Read week 5 lecture note and portfolio-practical notes.
Recommend completion: Complete in week 6.
Demonstration: With tutor in lab on Week 6 & Week 7.

Q1.Briefly explain about the Timer Counters in Arduino Mega and How to calculate the time
using the Timer counters.

Q2. Write a simple program to blink the LED every 500 milliseconds. When the push button
is pressed the LED blinking frequency should be double. (use hardware interrupts)

Q3.Write a simple program to blink the LED every 5 second using timer interrupts (Do not use
delay, millis, micros ) . (Require demonstration)

Q4. Write a simple program to blink the inbuilt LED every 500 milliseconds. Connect two
buttons to the Arduino (Button A & Button B) When A is pressed millis value should be printed
in the serial monitor and when the B is pressed micros value should be printed in the serial
monitor. (Use hardware interrupts) . (Require demonstration)

Q5. Write a program to display “I love Swinburne” in the LED matrix. When the external
button is pressed it should display your name. The text should move from left to right
continuously.(Use LED Dot Matrix MA7219 and interrupts). (Require demonstration)

8
EEE20003 – Portfolio-Practical Tasks Description

Pass Plus Task


Resources: All
Demonstration: With tutor in lab on Week 1 & Week 7.

Q1. To design digital clock with few features. Connect OLED display to Arduino. Write
program to display analog and digital clocks. At the beginning, the clock is set up using serial.
A real time clock (RTC) module can be added as well. (Require demonstration)

Q2. To design LED matrix with few features. Make a proper connection for 8×8 LED Matrix
with resistors to the microcontroller. The LED matrix have to be constructed manually by using
64 units of LED as 8×8 LED Matrix. Display your name and scroll from right to left
continuously. . (Require demonstration)

9
EEE20003 – Portfolio-Practical Tasks Description

Credit Task
Resources: All
Demonstration: With tutor in lab on Week 1 & Week 7.

Q1. Continuing from Pass Plus Task 1 for designing digital clock with few features. Connect
to a push button. Use the hardware interrupt to detect the button to set/change the clock setting
using single button. . (Require demonstration)

Q2. Continuing from Pass Plus Task 2 for designing LED matrix with few features. Use the
serial for allowing change the text of the display and save it to memory (RAM/EEPROM).
(Require demonstration)

10
EEE20003 – Portfolio-Practical Tasks Description

Distinction Task
Resources: All
Demonstration: With tutor in lab on Week 1 & Week 7.

Q1. Continuing from Credit Task 1 for designing digital clock with few features. Using the
same button to have additional feature to set alarm system. Connect to a speaker for the output
of the alarm. . (Require demonstration)

Q2. Continuing from Credit Task 2 for designing LED matrix with few features. Connect the
pushbutton to the embedded system. Add feature with the button. If button press for 1 second
or less, the text will moving from left to right. If the button is pressed more than 2 seconds, the
text will move from right to left. (Require demonstration)

11
EEE20003 – Portfolio-Practical Tasks Description

High Distinction Task


Resources: All
Demonstration: With tutor in lab on Week 1 & Week 7.

Q1. Continuing from Distinction Task 1 for designing digital clock with few features. Connect
the temperature sensor to the microcontroller. Using previous button to have additional feature
to turn on/off displaying temperature on the OLED display. If it is activated, read temperature
sensor and display on OLED display. (Require demonstration)

Q2. Continuing from Credit Task 2 for designing LED matrix with few features. Additional
features is need to be added with the same pushbutton to change up to 3 modes for speed of the
moving text includes slow, medium and fast. . (Require demonstration)

12
EEE20003 – Portfolio-Practical Tasks Description

13
EEE20003 – Portfolio-Practical Tasks Description

14

You might also like