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

IoT Lab File 2024-25

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)
82 views

IoT Lab File 2024-25

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/ 41

School of Computer Science Engineering in Emerging Technologies

Noida Institute of Engineering


and Technology
B-Tech in Computer Science &
Engineering
(CSBS) - Programme (Autonomous)
Regulation 2020, Greater Noida
Introduction to IoT Lab
Session (2024-2025) (ACSBS0712P)
ODD (7th Semester)
4th YEAR
Submitted By:
NAME: - _____________(Rollno)
School of Computer Science Engineering in Emerging Technologies

Noida Institute of Engineering and Technology


19, Institutional Area, Knowledge Park II , Greater
Noida
Uttar Pradesh – 201306, http://www.niet.co.in
SESSION-2024-25

INDEX SEM-7th (ODD)

S. NO. Particular Page No

1 Course and Faculty Details 3


2 Vision & Mission of the Institute 4

3 Vision & Mission of the Department 5

4 Program Educational Objectives 6

5 Program Outcome 7-8

6 Course Outcome 9

7 Program Specific Outcomes 10

8 Mapping of CO,PO, PSO and Justification 11-14

9 Evaluation Scheme 15

10 List of Programs as per Institute Curriculum 16

11 List of programs adopted by the Department 17

12 Programs 18-71

13 Viva Questions 73-74


School of Computer Science Engineering in Emerging Technologies

Faculty Details

Name of the Faculty: RIFA NIZAM KHAN

Designation: Assistant Professor

Department: Computer Science and Business System

Course Details

Programme: B TECH Batch: 2024-2025

Branch: Computer Science and Business Semester: 7TH


System

Subject: Introduction to IoT Lab Subject Code: ACSBS0712P

Course: Elective-V Subject

SESSION-2024-25

Course and Faculty Details SEM-7th (ODD)


School of Computer Science Engineering in Emerging Technologies

Vision & Mission of Institute


Vision of Institute:

To be an institute of academic excellence in the field of education, with future plan of becoming a
deemed university, earn name and hence win faith of the society.

Mission of Institute

To impart to its students a high-quality education, develop their skills, broaden their mental horizon
and nurture them into competent and talented professionals to meet the challenges of the new
millennium.

SESSION-2024-25

Vision & Mission SEM-7th (ODD)

Institute
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

Vision & Mission SEM-7th (ODD)

CSBS Department
Vision and Mission of the Department
Vision

To be recognized as a department committed to academic excellence in educational fostering


environment to make future leaders, innovators, and industry – ready professionals

Mission

M1: To impart globally connected cutting-edge technologies and business skills.

M2: To nurture lifelong learning practices, knowledge, and 21st century skills with focus on
entrepreneurship, research, and innovation.

M3: To produce globally competent and ethical professionals ready to serve the society.
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

Program Educational SEM-7th (ODD)


Objectives

Program Educational Objectives


The Program Educational Objectives (PEOs) of B.Tech (CSBS) program are as follows:

 PEO1: Engage in successful professional practices in emerging areas of computer science


and business systems and pursue higher education and research.

 PEO2: Adapt easily to dynamically changing environment, applying their knowledge in


technology abstraction and common business principles.

 PEO3: Demonstrate effective business communication with innovation mindset who can
effectively work in a team and exhibit strong ethics and life values to serve the society
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-
25
Program Specific Outcomes
SEM-7th (ODD)

S.NO. Program Specific Outcomes PSO Description

1 PSO1 Apply technical and business knowledge


to solve complex problems and face
current business challenges.

2 PSO2 Explore modern tools and technologies


and apply the knowledge to design and
develop solutions for betterment of the
society.

3 PSO3 Work innovatively and communicate


effectively with professionals worldwide
and pursue lifelong learning to add
value to society and environment.
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

Program Outcomes SEM-7th (ODD)

Program Outcomes

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization for the solution of complex engineering problems.

2. Problem analysis: Identify, formulate, research literature, and analyse complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.

3. Design/development of solutions: Design solutions for complex engineering problems and


design system components or processes that meet the specified needs with appropriate consideration
for public health and safety, and cultural, societal, and environmental considerations.

4. Conduct investigations of complex problems: Use research-based knowledge and research


methods including design of experiments, analysis and interpretation of data, and synthesis of
information to provide valid conclusions.

5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools, including prediction and modeling to complex engineering activities, with
an understanding of the limitations.

6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to the
professional engineering practice.

7. Environment and sustainability: Understand the impact of the professional engineering


solutions in societal and environmental contexts, and demonstrate the knowledge of, and need for
sustainable development.

8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms
of the engineering practice.

9. Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.

10. Communication: Communicate effectively on complex engineering activities with the


engineering community and with the society at large, such as, being able to comprehend and write
School of Computer Science Engineering in Emerging Technologies

effective reports and design documentation, make effective presentations, and give and receive clear
instructions.

11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and leader
in a team, to manage projects and in multidisciplinary environments.

12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

Program Scheme SEM-7th (ODD)


School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

Course Outcomes SEM-7th (ODD)

Course Outcomes

Introduction to IoT Lab (ACSBS-0712P) Year of Study: 2024-25

Course Outcomes (CO) Bloom’s Knowledge Level (KL)

CO1 Describe hardware components including Arduino, Raspberry Pi and K2


sensors.
CO2 Implement programs in Arduino IDE using python programming for K3
IO operations.
CO3 Understand various AI related real-world problems and their solutions. K2
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

CO-PO Mapping SEM-7th (ODD)

Introduction to IoT Lab


CO.K PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12

CO1 3 2 2 1 3 1 2 1 1 2 1 3

CO2 3 3 3 2 3 1 1 2 2 2 2 3

CO3 3 3 3 3 3 3 3 2 2 3 2 3

AVERAGE 3 2.7 2.7 2 3 1.7 2 1.7 1.7 2.3 1.7 3

SESSION-2024-25

CO-PO Justification SEM-7th (ODD)


School of Computer Science Engineering in Emerging Technologies

CO.k – Justification Remarks


PO.x
CO.1-PO.1 Describing hardware components requires and reinforces fundamental High
engineering knowledge.
CO.1-PO.2 Understanding hardware helps in analyzing problems related to these Moderate
components.
CO.1-PO.3 Knowledge of hardware is essential for designing systems and solutions. Moderate
CO.1-PO.4 While not directly involved in conducting investigations, understanding Low
hardware is a foundational skill.
CO.1-PO.5 Knowledge of hardware is crucial for the usage of modern engineering High
tools.
CO.1-PO.6 Minimal direct application to societal considerations. Low
CO.1-PO.7 Understanding hardware impacts the design for sustainability. Moderate
CO.1-PO.8 Minimal direct application to ethics. Low
CO.1-PO.9 Limited direct impact on teamwork. Low
CO.1- Ability to describe hardware components enhances technical Moderate
PO.10 communication.
CO.1- Limited direct impact on project management and finance. Low
PO.11
CO.1- Knowledge of hardware encourages lifelong learning in rapidly evolving High
PO.12 technology.
CO.2-PO.1 Programming requires strong foundational knowledge. High
CO.2-PO.2 Essential for identifying and analyzing problems. High
CO.2-PO.3 Crucial for designing and developing software solutions. High
CO.2-PO.4 Involves investigation and experimentation in programming. Moderate
CO.2-PO.5 Direct use of modern programming tools. High
CO.2-PO.6 Indirect impact on societal issues. Low
CO.2-PO.7 Indirect impact on sustainability. Low
CO.2-PO.8 Programming can involve ethical considerations Moderate
CO.2-PO.9 Programming often involves teamwork. Moderate
CO.2- Effective communication is needed for documentation and collaboration. Moderate
PO.10
CO.2- Knowledge of programming aids in project management. Moderate
PO.11
CO.2- Encourages continuous learning in new programming techniques and tools. High
PO.12
CO.3-PO.1 Applying AI solutions requires a strong engineering foundation. High
CO.3-PO.2 Critical for problem identification and analysis. High
CO.3-PO.3 Designing AI solutions involves creating complex systems. High
CO.3-PO.4 AI often requires research-based methods and investigations. High
CO.3-PO.5 AI relies on modern tools and technologies. High
School of Computer Science Engineering in Emerging Technologies

CO.3-PO.6 AI solutions must consider societal impacts. High


CO.3-PO.7 AI solutions can contribute to sustainability. High
CO.3-PO.8 AI involves significant ethical considerations. High
CO.3-PO.9 AI projects often require teamwork. Moderate
CO.3- Communicating AI solutions requires clarity and precision. High
PO.10
CO.3- AI projects need good management and understanding of finance. Moderate
PO.11
CO.3- AI is a rapidly evolving field, necessitating lifelong learning. High
PO.12
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

CO-PSO Mapping SEM-7th (ODD)

CO.K PSO1 PSO2 PSO3


CO1 3 3 2

CO2 3 3 2

CO3 3 3 3
3 3 2.3
AVG
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

CO-PSO Justification SEM-7th (ODD)

CO.k – Justification Remarks


PSO.x
CO.1-PSO.1 Understanding hardware components is crucial for applying technical High
knowledge to solve complex problems.
CO.1-PSO.2 Knowledge of modern tools like Arduino and Raspberry Pi is essential for High
designing and developing technological solutions.
CO.1-PSO.3 Describing hardware components aids in effective communication with Moderate
professionals and contributes to lifelong learning.
CO.2-PSO.1 Implementing programs using Arduino IDE and Python enhances technical High
skills needed to tackle business challenges.
CO.2-PSO.2 Programming and using modern IDEs directly involve applying modern High
tools and technologies.
CO.2-PSO.3 Developing these programs fosters innovation and continuous learning but Moderate
has a slightly lower direct impact on lifelong learning compared to other
COs.
CO.3-PSO.1 Understanding AI solutions is vital for applying both technical and business High
knowledge to complex problems.
CO.3-PSO.2 AI is a modern technology, and understanding its applications directly aligns High
with designing and developing solutions for societal betterment.
CO.3-PSO.3 Knowledge of AI fosters innovative thinking, effective communication on High
global platforms, and encourages lifelong learning to keep up with evolving
technologies.
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

List of Programs as per SEM-7th (ODD)


Institute Curriculum
School of Computer Science Engineering in Emerging Technologies

SESSION-2024-25

List of Programs adopted by SEM-7th (ODD)


Department

P.
S.NO. PRACTICAL CONDUCTED Date Signature
No.
1. Setting up the Arduino Development Environment, 31-07-24
connecting analog sensors to an Arduino Boarding and 07-08-24
reading analog sensor data.
2. Digital Input and Output reading using and Arduino board 14-08-24
and Arduino Development Environment. 21-08-24
3. Integrate an Arduino Board to a Raspberry Pi computer and 28-08-24
send sensor data from Arduino to the R Pi. 11-09-24
4. Setup Python on the R Pi and run sample R Pi programs on 18-09-24
the R Pi. Read the data from Arduino using Python 25-09-24
language.
5. Connect a R Pi Camera module to the Raspberry Pi and 09-10-24
using Python programming capture still images and video. 16-10-24
6. Set up TCP/IP socket server on a PC. Send a message from 23-10-24
the R Pi to the PC using socket communication. 30-10-24
7. Set up a MQTT broker on the PC. Send data from R Pi to PC 25-09-24
using MQTT protocol. Receive data from PC to R Pi using 06-11-24
MQTT protocol. .
8. Connect LED lights to an Arduino. Connect the Arduino to 13-11-24
the R Pi. Send Message from PC to R Pi via MQTT protocol. 20-11-24
On receipt of the message, toggle the LED lights on the
Arduino.
9. Set up an account in a cloud service (such as Google / AWS 20-11-24
or Azure). Set up a simple Http server using a language of
your choice. Push the image captured from the R Pi camera
to this web service. On receiving the image, store the
image in a database or file.
10. Develop a mobile application to view the images captured 27-11-24
by the R Pi camera.
SESSION-2024-25
Program No-1
SEM-7th (ODD)

AIM:- Setting up the Arduino Development Environment, connecting analog sensors to an


Arduino Boarding and reading analog sensor data.
Setting up the Arduino development environment and connecting analog sensors to an Arduino
board is a common task for electronics and DIY enthusiasts. Here's a step-by-step guide to help
you get started:
Step 1: Install Arduino IDE
Download Arduino IDE:
Visit the Arduino Software page.
Download the latest version of the Arduino IDE for your operating system (Windows, macOS, or
Linux).

Step 2: Connect Arduino Board


Connect Arduino Board:
Connect your Arduino board to your computer using a USB cable.
Install Drivers (if needed):
In some cases, you might need to install drivers for your specific Arduino board. Check the
manufacturer's website for instructions.
Step 3: Open Arduino IDE
Launch Arduino IDE:
Open the Arduino IDE on your computer.
Select Board and Port:
Go to "Tools" > "Board" and select your Arduino board model (e.g., Arduino Uno, Arduino
Nano).
Go to "Tools" > "Port" and select the port that corresponds to your connected Arduino board.
Step 4: Write and Upload a Simple Sketch
Open a New Sketch:
Click on "File" > "New" to open a new sketch.
Write a Simple Sketch:
Write a basic Arduino sketch to read analog sensor data. Here's an example for reading from an
analog sensor connected to analog pin A0:
const int analogPin =
A0; int sensorValue =
0; void setup() {
Serial.begin(9600);
} void
loop() {
sensorValue =
analogRead(analogPin);
Serial.println(sensorValue);
delay(1000);
}
Step 5: Connect Analog Sensor
Connect Analog Sensor:
Connect your analog sensor to one of the analog pins on the Arduino board.
Make sure to connect the sensor's power (VCC), ground (GND), and signal/data pin to the
appropriate pins on the Arduino.
Step 6: Monitor Sensor Data
Open Serial Monitor:
Go to "Tools" > "Serial Monitor" to open the Serial Monitor in the Arduino IDE.
View Sensor Data:
The sensor data should be displayed in the Serial Monitor in real-time.
SESSION-2024-25
Program No-2
SEM-7th (ODD)

AIM :- Digital Input and Output reading using and Arduino board and Arduino Development
Environment.
Reading Digital Input:
Step 1: Connect a Digital Input Device (Push Button):
Connect Push Button:
Connect a push button to one of the digital pins on the Arduino board. Connect one leg of the
button to the digital pin and the other leg to ground. You may also use a resistor (e.g., 10k ohms)
as a pull-up or pull- down resistor depending on your button's configuration.
Adjust Code:
Open the Arduino IDE.
Write a simple sketch to read the state of the
button. const int buttonPin = 2; int buttonState
= 0; void setup() {
pinMode(buttonPin, INPUT);
Serial.begin(9600);
} void
loop() {
buttonState =
digitalRead(buttonPin);
Serial.println(buttonState);
delay(1000);
}

Controlling Digital Output:


Step 2: Connect a Digital Output Device (e.g., LED):
Connect LED:
Connect an LED to another digital pin on the Arduino. Connect the LED's longer leg (anode) to
the digital pin and the shorter leg (cathode) to a current-limiting resistor, then connect the other
end of the resistor to ground.
Adjust Code:
Modify the code to control the LED based on the button state.
const int buttonPin = 2;
const int ledPin = 13; int
buttonState = 0; void
setup()
{ pinMode(buttonPin,
INPUT); pinMode(ledPin,
OUTPUT);
Serial.begin(9600);
} void
loop() {
buttonState =
digitalRead(buttonPin); if
(buttonState == HIGH)
{ digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
Serial.println(buttonState);
delay(1000);
}
Upload the Sketch:
Upload the modified sketch to your Arduino board.

Observe LED Control:


Press and release the button to observe how the LED responds based on the button state.
SESSION-2024-25
Program No-3
SEM-7th (ODD)

AIM :- Integrate an Arduino Board to a Raspberry Pi computer and send sensor data from
Arduino to the R Pi.
Hardware Setup:
Connect Arduino to Raspberry Pi:
Connect the Arduino to the Raspberry Pi using a USB cable. This allows the Raspberry Pi to
communicate with the Arduino over the USB serial connection.

Power Supply:
Power the Arduino using an external power source or the Raspberry Pi's USB ports.

Connect Sensors:
Connect your analog or digital sensors to the Arduino. Follow the wiring instructions for each
sensor.

Software Setup:
Arduino Side:
Upload Sensor Reading Sketch:
Write an Arduino sketch to read sensor data and send it over the
serial port const int sensorPin = A0; void setup() {
Serial.begin(9600);
} void
loop() {
int sensorValue =
analogRead(sensorPin);
Serial.println(sensorValue);
delay(1000);
}
Write Python Script:
Write a Python script to read data from the Arduino over the serial port.
import serial
import time
ser = serial.Serial('/dev/ttyUSB0',
9600) try: while True:
if ser.in_waiting > 0:
sensor_data = ser.readline().decode('utf-8').strip()
print("Sensor Data:", sensor_data)
time.sleep(1)
except KeyboardInterrupt:
ser.close()

Data Processing:
Modify the Python script to process the sensor data according to your application's requirements.
SESSION-2024-25
Program No-4
SEM-7th (ODD)

AIM :- Setup Python on the R Pi and run sample R Pi programs on the R Pi. Read the data from
Arduino using Python language.
To read data from Arduino using Python on a Raspberry Pi
1. Install Python on Raspberry Pi:
Most Raspberry Pi distributions come with Python preinstalled. However.

2. Connect Arduino to Raspberry Pi:


Connect your Arduino to the Raspberry Pi using a USB cable, and make sure the Arduino is
powered.

3. Install PySerial:
PySerial is a Python library for reading and writing data over a serial connection.

4. Write Python Script to Read Data from Arduino:


Create a Python script that reads data from the Arduino.
import serial
import time
ser = serial.Serial('/dev/ttyUSB0',
9600) try: while True: if
ser.in_waiting > 0:
sensor_data = ser.readline().decode('utf-
8').strip() sensor_value = int(sensor_data)
print("Sensor Data:", sensor_value)
threshold = 700 if sensor_value > threshold:
print("Threshold Exceeded!") time.sleep(1)
except KeyboardInterrupt:
ser.close()
Output :-
SESSION-2024-25
Program No-5
SEM-7th (ODD)

AIM:- Connect a R Pi Camera module to the Raspberry Pi and using Python programming
capture still images and video. Capture Still Images:
from picamera import
PiCamera import time
camera = PiCamera()
image_name =
"captured_image.jpg"
camera.capture(image_name)
time.sleep(1) camera.close()
print(f"Image captured and saved as {image_name}")
Capture Video:
from picamera import
PiCamera import time
camera = PiCamera()
camera.resolution = (640,
480) camera.framerate = 30
video_duration = 10 # Set the duration of the video in
seconds video_name = "captured_video.h264"
camera.start_recording(video_name)
camera.wait_recording(video_duration)
camera.stop_recording() camera.close()
print(f"Video captured and saved as {video_name}")
Output:-
SESSION-2024-25
Program No-6
SEM-7th (ODD)

AIM :- Set up TCP/IP socket server on a PC. Send a message from the R Pi to the PC using
socket communication.
Set Up TCP/IP Socket Server on PC:
import socket
HOST = '0.0.0.0'
PORT = 12345
server_socket = socket.socket(socket.AF_INET,
socket.SOCK_STREAM) server_socket.bind((HOST, PORT))
server_socket.listen(1)
print(f"Server listening on {HOST}:{PORT}")
client_socket, client_address =
server_socket.accept() print(f"Connection
established with {client_address}") data =
client_socket.recv(1024).decode('utf-8')
print(f"Received data: {data}")
client_socket.close() server_socket.close()

Send Message from Raspberry Pi to PC:


import socket
SERVER_HOST = 'PC_IP_ADDRESS'
SERVER_PORT = 12345
client_socket = socket.socket(socket.AF_INET,
socket.SOCK_STREAM) client_socket.connect((SERVER_HOST,
SERVER_PORT)) print(f"Connected to {SERVER_HOST}:
{SERVER_PORT}") message = "Hello from Raspberry Pi!"
client_socket.send(message.encode('utf-8')) print(f"Message sent:

{message}") client_socket.close()

Output:-
SESSION-2024-25
Program No-7
SEM-7th (ODD)

AIM:- Set up a MQTT broker on the PC. Send data from R Pi to PC using MQTT protocol.
Receive data from PC to R Pi using MQTT protocol.
Send Data from Raspberry Pi to PC:
import time
import random
import paho.mqtt.client as mqtt
broker_address =
"PC_IP_ADDRESS" port = 1883
topic = "sensor_data" client =
mqtt.Client()
client.connect(broker_address, port,
60) try: while True:
sensor_data = random.randint(1, 100)
client.publish(topic, f"Sensor Data:
{sensor_data}") print(f"Published: Sensor
Data: {sensor_data}") time.sleep(5) except
KeyboardInterrupt: client.disconnect()

Receive Data from PC to Raspberry Pi:


import paho.mqtt.client as mqtt
broker_address = "localhost" port =
1883 topic = "sensor_data" def
on_message(client, userdata, msg):
print(f"Received:
{msg.payload.decode()}") client =
mqtt.Client() client.on_message =
on_message
client.connect(broker_address, port, 60)
client.subscribe(topic)
client.loop_forever()

Output:-
SESSION-2024-25
Program No-8
SEM-7th (ODD)

AIM:- Connect LED lights to an Arduino. Connect the Arduino to the R Pi. Send Message from
PC to R Pi via MQTT protocol. On receipt of the message, toggle the LED lights on the Arduino.
To achieve the described setup, we need the following components:
Arduino board
LED lights
Raspberry Pi (R Pi)
PC
MQTT broker (such as Mosquitto)
Arduino Setup:
Connect the LED to one of the digital pins on the Arduino.
Connect the Arduino to your PC and upload a simple Arduino sketch to toggle the LED when it
receives a message through the serial port.
Python script to subscribe to the MQTT topic and send the messages to the Arduino via its serial
port: import paho.mqtt.client as mqtt import serial import time
arduino_port = "/dev/ttyACM0"
mqtt_broker =
"YOUR_MQTT_BROKER_IP"
mqtt_topic = "led_control"
ser = serial.Serial(arduino_port, 9600,
timeout=1) def on_connect(client, userdata,
flags, rc):
print("Connected to MQTT broker with result code
"+str(rc)) client.subscribe(mqtt_topic) def
on_message(client, userdata, msg): message =
msg.payload.decode('utf-8') print(f"Received message:
{message}") ser.write(message.encode()) client =
mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
client.connect(mqtt_broker, 1883,
60) client.loop_start() try: while
True: time.sleep(1) except
KeyboardInterrupt:
ser.close()
client.disconnect()
print("Disconnected from MQTT broker and Arduino.")

With this setup, when we send an MQTT message from your PC to the Raspberry Pi, the Python
script on the Raspberry Pi will forward the message to the Arduino, which will then toggle the
LED based on the received message.
SESSION-2024-25
Program No-9
SEM-7th (ODD)

AIM:- Set up an account in a cloud service (such as Google / AWS or Azure). Set up a simple
Http server using a language of your choice. Push the image captured from the R Pi camera to this
web service. On receiving the image, store the image in a database or file.
AWS Setup:
Create an AWS Account:
Go to the AWS website and create an account.

Create an S3 Bucket:
Go to the AWS S3 Console.
Create a new bucket to store the images.

Get AWS Access Key and Secret Access Key:


In the AWS Console, go to the IAM dashboard.
Create a new user with programmatic access and attach the AmazonS3FullAccess policy.
Note down the Access Key ID and Secret Access Key.
Python HTTP Server Setup:
1. Install Flask
2. Write a Simple Flask Server
3. Run the Flask Server
Raspberry Pi Camera Setup:
1. Install Required
Libraries 2. Capture and
Upload Image MongoDB
Setup:
1. Install MongoDB
2. Install pymongo Library
3. Update Flask Server to Store Image in MongoDB.
SESSION-2024-25
Program No-10
SEM-7th (ODD)

AIM:- Develop a mobile application to view the images captured by the R Pi camera.
import
'package:flutter/material.dart';
import 'package:http/http.dart' as
http; import 'dart:convert'; void
main() { runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext
context) { return
MaterialApp( title: 'Image
Viewer', theme:
ThemeData( primarySwatch:
Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<ImageInfo> imageList = [];
@override void
initState()
{ super.initState(
);
fetchImageList();
}
Future<void> fetchImageList() async {
final response = await http.get('http://YOUR_FLASK_SERVER_IP:5000/images'); if (response.statusCode
== 200) {
List<dynamic> data = jsonDecode(response.body); setState(() {
imageList = data.map((item) => ImageInfo.fromJson(item)).toList();
}); } else {
throw Exception('Failed to load image list');
}
}
@override
Widget build(BuildContext context) { return Scaffold( appBar:
AppBar( title: Text('Image Viewer'),
),
body: ListView.builder( itemCount: imageList.length,
itemBuilder: (context, index) { return ListTile(
title: Text(imageList[index].filename), subtitle:
Image.network(imageList[index].url),
);
},
),
);
}
} class ImageInfo { final String filename; final
String url;
ImageInfo({required this.filename, required this.url}); factory
ImageInfo.fromJson(Map<String, dynamic> json) { return ImageInfo( filename:
json['filename'], url: json['url'],
);
}
}
Output:-
SESSION-2024-25
VIVA QUESTIONS
SEM-7th (ODD)

1. Introduction to IoT and Use Cases

1. What is the Internet of Things (IoT)?


2. Describe the main components or building blocks of IoT.
3. How does IoT differ from the traditional internet?
4. What is Consumer IoT, and how does it differ from the Industrial Internet of Things (IIoT)?
5. Explain some use cases of IoT in the healthcare industry.
6. Describe IoT applications in the transportation sector.
7. How is IoT used in smart cities? Provide some examples.
8. What are the benefits of using IoT in agriculture?
9. Explain how IoT is applied in the manufacturing industry.
10. How can IoT improve energy management in smart grids?
11. What role does IoT play in retail and customer experience?
12. Describe an example of IoT usage in home automation.
13. What are some examples of IoT applications in environmental monitoring?
14. Explain how IoT helps with supply chain management and logistics.
15. Discuss some of the challenges faced by IoT in consumer applications.
16. What are the security concerns associated with IoT devices?
17. How does IoT benefit predictive maintenance in industrial settings?
18. Explain the concept of "connected cars" in the automotive industry.
19. What role does IoT play in enhancing public safety?
20. How can IoT be used in water quality management?

2. Architecture

21. What is an IoT reference architecture, and why is it important?


22. Describe the key components of an IoT reference architecture.
23. What is the Industrial Internet Reference Architecture (IIRA)?
24. Explain the role of edge computing in IoT.
25. What is the function of an IoT gateway?
26. Describe the purpose of data ingestion in an IoT system.
27. How does data processing differ at the edge versus the cloud in an IoT setup?
28. Explain what data stream processing is and where it is used in IoT.
29. What are some common communication protocols used in IoT architecture?
30. How does cloud computing interact with IoT?
31. Describe the difference between fog computing and edge computing.
32. What is the significance of middleware in an IoT architecture?
33. How does a data processing pipeline work in an IoT system?
34. What are some common security challenges in IoT architecture?
35. Explain the importance of interoperability in IoT architecture.
36. Describe the role of analytics in IoT data processing.

3. Sensors and Industrial Systems

37. What is a sensor, and how does it work in an IoT system?


38. Define transducers and their role in IoT applications.
39. How do sensors collect data in an IoT environment?
40. Explain the process of integrating sensors with sensor processing boards.
41. What are the main types of sensors used in industrial IoT applications?
42. How are sensors used in environmental monitoring?
43. Describe how data acquisition systems function in industrial IoT.
44. What is an industrial control system, and why is it important?
45. Explain the purpose of a programmable logic controller (PLC) in industrial IoT.
46. How is SCADA (Supervisory Control and Data Acquisition) used in IoT?
47. What are the differences between analog and digital sensors?
48. Describe the process of sensor calibration and why it is necessary.
49. Explain the concept of sensor fusion in IoT.
50. What are some challenges in integrating sensors with IoT systems in industrial settings?

You might also like