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

School of CIT, EIU. Lecturer – Phan Van Vinh, Ph.D.

Course: CSE479 – Internet of Things (IoT)


Title: Review for the final exam (2023)

THI CUỐI HỌC KÌ


- Thời gian: 90 phút
- Hình thức thi: Tự luận (Lý thuyết và bài tập thực hành)
- Sinh viên được sử dụng tài liệu là 1 tờ giấy A4 (viết tay)

NỘI DUNG ÔN TẬP


A/ Lý thuyết
1. Đặc điểm của các linh kiện điện tử cơ bản: điện trở, bộ nguồn, LED. Cách đọc giá trị điện
trở, đo các thông số (U, I, R) dùng đồng hồ VOM
2. Đặc điểm cấu tạo phần cứng của Arduino, các chân I/O, PWM, cấp nguồn
3. Giao tiếp serial:
- Phân biệt truyền dữ liệu song song và nối tiếp, truyền đồng bộ và bất đồng bộ
- Đặc điểm của các chuẩn truyền: TTL, SPI, I2C, RS232/UART
- Cho ví dụ về ứng dụng chuẩn truyền nối tiếp trên các thiết bị arduino, cảm biến, LCD
4. Giao thức truyền dữ liệu:
- IoT protocol stack
- Các giao thức truyền dữ liệu trong IoT: HTTP, CoAP, MQTT (nêu đặc điểm, so sánh
giống và khác nhau, cho ví dụ), chú trọng giao thức MQTT
5. Truyền dữ liệu Wireless: mô hình giao tiếp của AP (Acess Point)
6. Wireless communication problem (hidden terminal problem and exposed terminal
problem)
7. Nêu những cách để điều khiển thiết bị arduino và thu thập dữ liệu? Cho ví dụ
8. Ứng dụng IoT trong công nghiệp, y tế, giáo dục và đời sống, etc.

B/ Thực hành
Lập trình viết ứng dụng
- Sử dụng Arduino, LED
- Điều khiển LED ON/OFF, chỉnh độ sáng theo chu kì
- Điều khiển LED thông qua Push Button
- Điều khiển dùng giao tiếp serial (thông qua Serial monitor)
- Giao tiếp giữa hai board Arduino, giữa Arduino và các thiết bị khác thông qua kết nối
Serial

1
School of CIT, EIU. Lecturer – Phan Van Vinh, Ph.D.

C/ BÀI TẬP (IMPORTANT)

LED Control:

1) Write an Arduino program to turn on an LED connected to pin 13 for 1 second and
then turn it off for 1 second in an infinite loop.
2) Create an Arduino sketch that uses a push button to control an LED connected to
pin 10.
3) Write a program that gradually increases the brightness of an LED connected to
pin 9 using PWM.
4) Develop a code that blinks multiple LEDs in a sequence with a delay of 200ms
between each LED.
5) Implement a traffic light system using three LEDs (red, yellow, green) with
appropriate delays for each state.
6) Develop a program to control the brightness of an LED using a potentiometer
connected to an analog pin.
7) Create a program to read the state of a digital input and use it to control an LED on
a different pin.
8) Implement a code that uses millis() to blink an LED without using delay().

Serial Communication:

1) How do you initialize serial communication using the Arduino Serial library?
2) Develop an Arduino program that turns an LED on when receiving the character
'1' via serial communication and turns it off when receiving '0'.
3) Write a code that allows you to control the brightness of an LED connected to pin
9 using values received over serial communication (0-255).
4) Write a program that receives commands 'on' and 'off' over serial communication
to control the state of an LED connected to pin 7.

2
School of CIT, EIU. Lecturer – Phan Van Vinh, Ph.D.

5) Develop a sketch to send a "Hello, Arduino!" message over the serial port when a
button is pressed.
6) Create a remote-controlled LED system using serial communication where you
can switch between multiple LED patterns using different command codes.
7) Write a program that receives a numerical value over serial communication and
blinks an LED connected to pin 6 that number of times.
8) Create a bidirectional communication between two Arduinos using Serial
communication. Send a message from one Arduino, and display it on the other.
9) Write a program that reads analog sensor data from A0 and sends it over the serial
port to be displayed on the computer.

You might also like