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

VIETNAM NATIONAL UNIVERSITY HCMC

INTERNATIONAL UNIVERSITY
SCHOOL OF BIOMEDICAL ENGINEERING

HOMEWORK 2

Deadline: Monday - 11/12/2022

SUBMISSION REQUIREMENT

Students do the assigned exercises using actual Arduino circuits or simula�on so�ware (Tinkercad) and
submit on IU Blackboard.

i. For those of you who use the actual Arduino circuit, please submit the code file (.ino) from
the Arduino IDE software and the video clip recording for each exercise (.mp4).
ii. For those of you who use simulation software (Tinkercad), please submit the source code
file (.ino) from the Arduino IDE software and the screen recording (.mp4) of each exercise
from the stimulation website.

Please arrange all files in ONE FOLDER (Name-Student ID/Ex: KhuuDoanDucQuang_BEBEIU20038) and
submit in the ZIP format or Google Drive Link.

Exercise 1 (25pts): Student has to develop the control circuit with one LED and one Buton1. In the
program, you have to make a program that can use buton as the switch buton to control the Fading Led.
Whenever buton is pressed, the LED will fade in and off in 4 �mes, then it will be turn off. A�er that, the
user can press buton again to repeat the process. In addition, create one Stop Button2 so that it can close
and disable the Button1 until you click the Button2 two times to enable the Button1 again. (+5pts) ( No
reference )

References:

htps://drive.google.com/file/d/1hYN2Cmz-6S8SM9uIoWqRtwiYlprgDKlV/view?usp=sharing

Exercise 2 (20pts): Student has to develop the control circuit with two LEDs and one Buton.

- a/ After the 1st press, the 1st LED will fade on and fade off
- b/ After the 2nd press, the 2nd LED will fade on and fade off
- c/ After the 3rd press, both LED 1 and LED 2 will fade on
- d/ After the 4th press, both LED 1 and LED 2 will fade off
- e/ After the 5th press, repeat from a/
References:
htps://drive.google.com/file/d/16Ni7rrm8VgnNBAxyGp4RQTrkQxv8MOBD/view?usp=sharing

Hint: You should know that the “flag” variable can containt more variables

Exercise 3 (30pts): Student has to develop the control circuit with one LED and two Buton. In the program,
you must make a program that only Buton 1 can turn on the LED (If press buton 2, LED cannot flash).
Then only buton 2 can turn off the LED (If press buton 1, LED cannot be turned off).

References:

htps://drive.google.com/file/d/1Wn-yaXoOiW54WkhdlA8BdjqLQkfR9DOR/view?usp=sharing

Exercise 4 (20pts): Student will develop the LED controlling interface with one LED and control it via the
Serial Monitor. In the program, you will create the simple GUI interface via Serial monitor, which has the
welcome text, the controller instruc�on and the real�me track task whenever the task has executed
done. For the controller LED, whenever user type “a” the LED will be turned on; type “b” the LED will be
turned off; type “c” the LED will blink in 3 �mes; type “d” the LED will fade in and off in 3 �mes.

References:
htps://drive.google.com/file/d/1mWZrCO7aw_aQVFP6kMBHbKdc3sEVtdBe/view?usp=sharing

You might also like