As2 - 1682 - GCS0803 - NX - Hua Kien Phuc - GCS190254
As2 - 1682 - GCS0803 - NX - Hua Kien Phuc - GCS190254
As2 - 1682 - GCS0803 - NX - Hua Kien Phuc - GCS190254
Internet of Things
ASSIGNMENT
No.2
Project 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:
2|Page
ASSIGNMENT 2 BRIEF
Assignment title
Academic Year
Unit Tutor
Submission
Issue date
date
Submission Format:
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
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,)
4|Page
Learning Outcomes and Assessment Criteria
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
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)
7|Page
Figure 1: Arduino Uno R3
Technical specifications
1.2.2 ..................
1.2.3 ..................
1.2.4 ..................
1.3 Assembly
8|Page
1.3.2 .........
1.3.3 ........
1.3.4 ........
1.4 Coding
9|Page
#include <Servo.h> //standard library for the servo
//sensor pins
#define trig_pin 11 //
#define echo_pin 12 //
Servo servo_motor;
void setup(){
pinMode(RightMotorForward, OUTPUT);
pinMode(LeftMotorForward, OUTPUT);
pinMode(LeftMotorBackward, OUTPUT);
pinMode(RightMotorBackward, OUTPUT);
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);
moveStop();
delay(300);
moveBackward();
delay(50);
moveStop();
delay(300);
distanceRight = lookRight();
delay(300);
distanceLeft = lookLeft();
delay(300);
turnRight();
moveStop();
else{
turnLeft();
11 | P a g e
moveStop();
else{
moveForward();
distance = readPing();
digitalWrite(8 , HIGH);
digitalWrite(10 , HIGH);
digitalWrite(13 , HIGH);
digitalWrite( 3, HIGH);
}}}} else{
digitalWrite(8, LOW);
digitalWrite(10, LOW);
digitalWrite(13, LOW);
digitalWrite(3, LOW);
int lookRight(){
servo_motor.write(10);
delay(300);
delay(80);
servo_motor.write(90);
return distance;
12 | P a g e
}
int lookLeft(){
servo_motor.write(170);
delay(300);
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.7 ..................
1.8 .................
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