0% found this document useful (0 votes)
73 views

IoT Lab5 2020 21 Sem5 I010

Deepak Chaudhary was instructed to program a smart home application using an MCU board in Cisco Packet Tracer. They added sensors, connected the sensors and MCU board, and programmed Blockly code to control devices based on sensor input. Deepak wrote programs to turn on a ceiling fan if motion was detected, turn on a lawn sprinkler if temperature was over 28 degrees Celsius, and turn on a coffeemaker if temperature was below 18 degrees Celsius. Screenshots were provided of the network layout, Blockly code, and output for each program. A conclusion stated that MCU connection and programming in Packet Tracer for IoT applications was demonstrated.

Uploaded by

Deepak Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

IoT Lab5 2020 21 Sem5 I010

Deepak Chaudhary was instructed to program a smart home application using an MCU board in Cisco Packet Tracer. They added sensors, connected the sensors and MCU board, and programmed Blockly code to control devices based on sensor input. Deepak wrote programs to turn on a ceiling fan if motion was detected, turn on a lawn sprinkler if temperature was over 28 degrees Celsius, and turn on a coffeemaker if temperature was below 18 degrees Celsius. Screenshots were provided of the network layout, Blockly code, and output for each program. A conclusion stated that MCU connection and programming in Packet Tracer for IoT applications was demonstrated.

Uploaded by

Deepak Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Deepak Chaudhary Roll no : I010 Batch : A1

5.To program smart home application using MCU board using cisco
packet tracer.

Submission deadline: Announced in the class (Progress must be show in class – marks will be based on viva)
File name: IoT-Lab4-2021-20-Sem5-rollno.docx/pdf/doc

Part A
Aim: To program smart home application using MCU board using cisco packet tracer.
Procedure:
1. Reuse your last lab session packet tracer and make a new copy of it.
2. Add a MCU board
At the bottom left corner of the Packet Tracer window, locate and click the [components] icon in
the top row, and the [boards] icon in the bottom. Click on MCU board and then click in the
Logical workspace to add the board

3. Add sensors
At the bottom left corner of the Packet Tracer window, locate and click the [components] icon in
the top row, and the [sensor] icon in the bottom. Click on motion sensor and temperature and
then click in the Logical workspace to add them

4. Connect sensor and MCU


Connect the MCU board, motion sensor, temperature sensor, ceiling fan or AC, lawn sprinkler,
and coffeemaker with [IoT custom cable]

Network layout
Deepak Chaudhary Roll no : I010 Batch : A1

Blocky programming
Blockly is a visual programming editor which uses graphical blocks to represent code concepts like
variables, logical expressions, loops, and more. It helps students to better understand and apply
programming principles without having to worry about the specific syntax of a specific programming
language.

Links:

Basic programming: https://www.youtube.com/watch?v=N2UKmavBAqo

IoT application

Part 1- https://www.youtube.com/watch?v=UikLZuR6QLY

Part 2 - https://www.youtube.com/watch?v=OaJBqvWRy1E
Deepak Chaudhary Roll no : I010 Batch : A1

Part B: Report to be submitted:


Aim: To program smart home application using MCU board using cisco packet tracer

Observations:

1. Legible screen shots showing step-by-step creation of your set-up.

- Using the previous lab connection

- Adding all the required devices


Deepak Chaudhary Roll no : I010 Batch : A1

- Connecting all the devices ( Motion sensor , Temperature Sensor, Coffee Maker, Ceiling Fan ,
Lawn Sprinkler ) with MCU board using the IoT custom cable )

2. Write a program to turn ON the ceiling fan or AC in the room, if motion sensor has detected
presence in the room. Screen shot of code and output

Code :
Deepak Chaudhary Roll no : I010 Batch : A1

Output :

- Click on Run button , hover on motion sensor and press Alt key and the result will be “1023”
which means that motion sensor is detecting the presence and the fan will be turned ON.
Deepak Chaudhary Roll no : I010 Batch : A1

- As we hover on motion sensor the fan turn ON and MCU gives output as 1023 and when
there is no hover , no motion is detected and hence the fan automatically gets turned OFF.

3. Write a program to turn ON the lawn sprinkler if temperature sensor has detected value
greater than 28 degrees Celsius. Screen shot of code and output.
(28 degrees converted to 654.72 according to conventions)
Code :
Deepak Chaudhary Roll no : I010 Batch : A1

Output :
- As the temperature rises above 30 degrees , the sprinkler gets turned ON.

- As the temperature is below 30 degrees, the lawn sprinkler is turned OFF


Deepak Chaudhary Roll no : I010 Batch : A1

4. Write a program to turn ON coffeemaker if temperature is below 18 degrees Celsius. Screen


shot of code and output.
( 18 degrees converted to 603.599 according to the conventions )
Code :
Deepak Chaudhary Roll no : I010 Batch : A1

Output :
- Since the temperature is less than 18 degrees , the coffee maker is turned ON.

- As the temp is above 18 degrees, the coffee maker is turned OFF.


Deepak Chaudhary Roll no : I010 Batch : A1

5. Packet tracer file (IoT-<Labno>-2020-21-Sem5-<rollno>. pkt)

Conclusion (few lines): In this lab , we learnt how MCU works in cisco packet tracer and how is it
connected with other devices . We did blocky programming for setting up the required conditions in
the above questions and got the desired outputs.

You might also like