1 Hanoi University of Science and Technology: School of Electrical Engineering, 03 July 2022
1 Hanoi University of Science and Technology: School of Electrical Engineering, 03 July 2022
1 Hanoi University of Science and Technology: School of Electrical Engineering, 03 July 2022
*
2
Hanoi University of Science and Technology
School of Electrical Engineering, 03 July 2022
Mini Project
Simulating A Speed Sensor Mounted On
A DC Motor Programming
Student Names & ID
Phan Sỹ Nhật Tân – 20192247- ĐKTĐH- HTĐ Name Instructor
Vũ Quang Khải – 20192218 - ĐKTĐH- HTĐ TS. Hoàng Đức Chinh
Nguyễn Thành Hưng– 20192211- ĐKTĐH- HTĐ
Keyworks:
Linked list,n_number_sensors(n),t_sampling,(t),t_interval,
speed, node.
I. INDUCTION
The requirement
The idea
In this report, we show a program that creates a data
file including speed of motor in “speed_data” and
processing this information following to
characteristics of them. There are several data
structures used for this task, such as array,stack,hash Structures
table,etc; however, we choose Linked-List because of This mini project based on parent folder contains three main
its easy and it is suitable to supplied characteristics part:
for enlarge the size of data results. The program can + files of task 1
hadle some error that may occur by displaying a + files of task 2
message and default values when user have incorrect + report.docx
syntax in comment line.
Linked List
In computer science, a linked list is a linear collection of data Flowchart Task 1, Task 2
elements, whose order is not given by their physical placement (as figures below)
in memory. Instead, each elements points to the next. It is a Implementaton And Invaluation Of Results
data structure consisting of a collection of nodes which
a, Task 1
3
Hanoi University of Science and Technology
School of Electrical Engineering, 03 July 2022
continue to check argv[i+1]. If argv[i+1] is satisfied; program
The users can insert the requirement on command window will get that value; otherwise, it will notify corresponding
with optional number of argv but it should be abeyed the error on ‘task1.log’. More than one errors can be represented
correct format: cause of lots of argv[i] here.
-> notify the errors -> create ‘task1.log’ file with the content + argc=6
like that:
If user insert only “-n” or “-st” or “-si” and after with wrong
format argv, it will represents notify such as:
. A compelete format within 7 argv
b, Task 2
# Step 3: writeDataSummary(head)
IV. REFERENCE
[1] https://www.geeksforgeeks.org/data-structures/linked-list/
[2] https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/file-
trong-cpp/doc-file-trong-cpp-stream/
[3] https://www.geeksforgeeks.org/rand-and-srand-in-ccpp/
[4] https://www.delftstack.com/howto/cpp/how-to-get-time-in-
milliseconds-cpp/
Flowchart Task 1
7
Hanoi University of Science and Technology
School of Electrical Engineering, 03 July 2022
Flowchart Task 2