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

Higher Nationals in Computing

Internet of Things
ASSIGNMENT
No.2

Project name:

the car automatically dodges obstacles

Learner’s name: Hua Kien Phuc


Assessor name: NGUYEN VAN SON
Class: GCS0603_NX
Learner’s ID: GCS190254
Subject’s ID: 1690
Assignment due: Assignment submitted:
ASSIGNMENT 2 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing

Unit number and


Unit 43: Internet of Things
title

Date Received 1st


Submission date
submission

Re-submission Date Received 2nd


Date submission

Student Name Student ID

Class Assessor name

Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the
consequences of plagiarism. I understand that making a false declaration is a form of
malpractice.

Student’s signature

Grading grid

P5 P6 P7 M5 M6 D2 D3

1|Page
 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:


Internal Verifier’s Comments:

Signature & Date:

2|Page
ASSIGNMENT 2 BRIEF

Qualification BTEC Level 5 HND Diploma in Computing

Unit number Unit 43: Internet of Things

Assignment title

Academic Year

Unit Tutor

Submission
Issue date
date

IV name and date

Submission Format:

Format: This assignment is an Individual assignment and specifically including 1


document:
You must use font Calibri size 12, set number of the pages and use multiple
line spacing at 1.3. Margins must be: left: 1.25 cm; right: 1 cm; top: 1 cm and
bottom: 1 cm. The reference follows Harvard referencing system. The
recommended word limit is 2.000-2.500 words. You will not be penalized for
exceeding the total word limit. The cover page of the report has to be the
Assignment front sheet 1.
Submission Students are compulsory to submit the assignment in due date and in a way
requested by the Tutors. The form of submission will be a soft copy posted on
http://cms.greenwich.edu.vn/
Note: The Assignment must be your own work, and not copied by or from another
student or from
books etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other
sources, you must reference your sources, using the Harvard style. Make sure that you
know how to reference properly, and that understand the guidelines on plagiarism. If you
do not, you definitely get fail

3|Page
Unit Learning Outcomes:

LO1 Analyze what aspects of IoT are necessary and appropriate when designing software
applications
LO2 Outline a plan for an appropriate IoT application using common architecture, frameworks,
tools, hardware and APIs
LO3 Develop an IoT application using any combination of hardware, software, data, platforms and
services.
LO4 Evaluate your IoT application and detail the problem your IoT application solves, the potential
impact on people, business, society and the end user and the problems it might encounter when
integrating into the wider IoT ecosystem

Assignment Brief and Guidance:

You currently work as a product developer for a new startup where you design IoT products
for the consumer, corporate, government and defense clients. As part of your role your
manager has tasked you to plan and develop a new IoT product, service or application for
a potential client. You are required to identify a target user and conduct tests with this user
and include this feedback into multiple iterative versions of your product.
Part 1 (Assignment 1): For the first part, you must:

• Plan an IoT application for a specific target end user and the tests you intend to
conduct with this user. This plan will be in the form of a document and will include
supporting evidence and material, such as user personas and customer journey
maps.
• Create multiple iterations of your application and modify each iteration with
enhancements gathered from user feedback and experimentation. This will follow
the pathway outlined in your plan. (log book,)

Part 2 (Assignment 2): For the first part, you must:

• Show evidence about Developed IoT application using any combination of


hardware, software, data, platforms and services (video or images of your IoT
system with code snippet)
• Evaluate your IoT application and detail the problem your IoT application solves, the
potential impact on people, business, society and the end user and the problems it
might encounter when integrating into the wider IoT ecosystem

4|Page
Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO3 Develop an IoT application using any combination of hardware, software, data,
platforms and services.

P5 Employ an M5 Reconcile and evaluate


appropriate set of tools end user feedback and
to develop your plan into determine advantages and
an IoT application. disadvantages of your
chosen IoT techniques.
P6 Run end user
experiments and
examines feedback.

LO4 Evaluate your IoT application and detail the problem your IoT application solves,
the potential impact on people, business, society and the end user and the problems
it might encounter when integrating into the wider IoT ecosystem

P7 Evaluate end user M6 Undertake a critical D3 Critique the overall


feedback from your IoT review and compare your success of your application.
application. final application with the Did it solve your problem?
original plan. What is the potential impact
on people, business, society
and the end user? What
problems might it
encounter when integrating
into the wider IoT
ecosystem?

5|Page
Contents
1. Develop my plan into an IoT application (P5) ................................................................................. 7
1.1 My project design ................................................................................................................... 7
1.2 Hardware ................................................................................. Error! Bookmark not defined.
1.2.1 Arduino Uno R3 ............................................................................................................... 7
1.2.2 .................. ...................................................................................................................... 8
1.2.3 .................. ...................................................................................................................... 8
1.2.4 .................. ...................................................................................................................... 8
1.3 Assembly ................................................................................................................................. 8
1.3.1 DHT11 (Temperature and Humidity) Sensor with Arduino UNO .................................... 8
1.3.2 ......... ............................................................................................................................... 9
1.3.3 ........ ................................................................................................................................ 9
1.3.4 ........ ................................................................................................................................ 9
1.4 Coding ..................................................................................................................................... 9
1.4.1 Coding for Ariduno .......................................................................................................... 9
1.5 Cloud and Database .............................................................................................................. 16
1.6 Coding for Smartphone App/Website .................................................................................. 16
1.7 .................. ............................................................................................................................ 16
1.8 ................. ............................................................................................................................. 16
2. Some photos of the project (evidences) (P5) ............................................................................... 16
3. Feedback (P6, P7, M5) .................................................................................................................. 16
3.1 List of survey questions............................................................ Error! Bookmark not defined.
3.2 Summary about survey ............................................................ Error! Bookmark not defined.
3.3 Evaluation about survey .......................................................... Error! Bookmark not defined.
4. The final application with the original plan (M6).......................................................................... 18
5. Concluson ...................................................................................................................................... 18
6. References .................................................................................................................................... 18

6|Page
1. Develop my plan into an IoT application (P5)

1.1 My project design

1.2 Equipments self-dodge obstacles

1.2.1 Arduino Uno R3

7|Page
Figure 1: Arduino Uno R3

Technical specifications

− Microcontroller: Microchip ATmega328P


− Operating Voltage: 5 Volts
− Input Voltage: 7 to 20 Volts
− Digital I/O Pins: 14 (of which 6 provide PWM output)
− Analog Input Pins: 6
− DC Current per I/O Pin: 20 mA
− DC Current for 3.3V Pin: 50 mA
− Flash Memory: 32 KB of which 0.5 KB used by bootloader
− SRAM: 2 KB
− EEPROM: 1 KB
− Clock Speed: 16 MHz
− Length: 68.6 mm
− Width: 53.4 mm
− Weight: 25 g

1.2.2 ..................
1.2.3 ..................

1.2.4 ..................

1.3 Assembly

1.3.1 DHT11 (Temperature and Humidity) Sensor with Arduino UNO

Arduino Uno DHT11


GND GND
D2 Data
5V VCC

8|Page
1.3.2 .........

1.3.3 ........

1.3.4 ........

1.4 Coding

1.4.1 Coding for Ariduno

9|Page
#include <Servo.h> //standard library for the servo

#include <NewPing.h> //for the Ultrasonic sensor function library.

//L298N motor control pins

const int LeftMotorForward = 6; //in2

const int LeftMotorBackward = 7; //in1

const int RightMotorForward = 5; //in3

const int RightMotorBackward = 4; //in4

//sensor pins

#define trig_pin 11 //

#define echo_pin 12 //

#define maximum_distance 400

boolean goesForward = false;

int distance = 400;

NewPing sonar(trig_pin, echo_pin, maximum_distance); //sensor function

Servo servo_motor;

void setup(){

pinMode(RightMotorForward, OUTPUT);

pinMode(LeftMotorForward, OUTPUT);

pinMode(LeftMotorBackward, OUTPUT);

pinMode(RightMotorBackward, OUTPUT);

servo_motor.attach(9); //our servo pin

servo_motor.write(90);

delay(2000);

distance = readPing();

10 | P a g e
delay(100);

distance = readPing();

delay(100);

distance = readPing();

delay(100);

distance = readPing();

delay(100);

void loop(){

int distanceRight = 0;

int distanceLeft = 0;

delay(50);

if (distance <= 30){

moveStop();

delay(300);

moveBackward();

delay(50);

moveStop();

delay(300);

distanceRight = lookRight();

delay(300);

distanceLeft = lookLeft();

delay(300);

if (distanceRight >= distanceLeft){

turnRight();

moveStop();

else{

turnLeft();

11 | P a g e
moveStop();

else{

moveForward();

distance = readPing();

if (distance <= 60){

digitalWrite(8 , HIGH);

if (distance <= 40){

digitalWrite(10 , HIGH);

if (distance <= 30){

digitalWrite(13 , HIGH);

if (distance <= 20){

digitalWrite( 3, HIGH);

}}}} else{

digitalWrite(8, LOW);

digitalWrite(10, LOW);

digitalWrite(13, LOW);

digitalWrite(3, LOW);

int lookRight(){

servo_motor.write(10);

delay(300);

int distance = readPing();

delay(80);

servo_motor.write(90);

return distance;

12 | P a g e
}

int lookLeft(){

servo_motor.write(170);

delay(300);

int distance = readPing();

delay(80);

servo_motor.write(90);

return distance;

delay(80);

int readPing(){

delay(70);

int cm = sonar.ping_cm();

if (cm==0){

cm=250;

return cm;

void moveStop(){

digitalWrite(RightMotorForward, LOW);

digitalWrite(LeftMotorForward, LOW);

digitalWrite(RightMotorBackward, LOW);

digitalWrite(LeftMotorBackward, LOW);

void moveForward(){

13 | P a g e
if(!goesForward){

goesForward=true;

digitalWrite(LeftMotorForward, HIGH);

digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorBackward, LOW);

digitalWrite(RightMotorBackward, LOW);

void moveBackward(){

goesForward=false;

digitalWrite(LeftMotorBackward, HIGH);

digitalWrite(RightMotorBackward, HIGH);

digitalWrite(LeftMotorForward, LOW);

digitalWrite(RightMotorForward, LOW);

void turnRight(){

digitalWrite(LeftMotorForward, HIGH);

digitalWrite(RightMotorBackward, HIGH);

digitalWrite(LeftMotorBackward, LOW);

digitalWrite(RightMotorForward, LOW);

delay(390);

14 | P a g e
digitalWrite(LeftMotorForward, HIGH);

digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorBackward, LOW);

digitalWrite(RightMotorBackward, LOW);

void turnLeft(){

digitalWrite(LeftMotorBackward, HIGH);

digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorForward, LOW);

digitalWrite(RightMotorBackward, LOW);

delay(390);

digitalWrite(LeftMotorForward, HIGH);

digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorBackward, LOW);

digitalWrite(RightMotorBackward, LOW);

15 | P a g e
1.5 Cloud and Database

1.6 Coding for Smartphone App/Website

1.7 ..................

1.8 .................

2. Clip and some photos of the project (evidences) (P5)


https://drive.google.com/file/d/1nyE7FkLSeckZJyd_hunrNyLeauXcxKqz/view

3. Feedback (P6, P7, M5)

16 | P a g e
17 | P a g e
4. The final application with the original plan (M6)

4. Concluson
In my opinion, I gathered from many different opinions on the internet and the group, so there will
be shortcomings and mistakes, I hope you can comment and point them out to us. Thanks for taking
the time to read our work

5. References

18 | P a g e

You might also like