Professional Documents
Culture Documents
UNIT 3 Developing IoTs-1
UNIT 3 Developing IoTs-1
UNIT 3 Developing IoTs-1
DEVELOPING IOTs
In this step, various options related to the IoT system deployment and
operation are defined, such as:
• Service hosting options
• Storage options
• Device options
• Application hosting options
9. Device and Component Integration
• In this step the devices like sensors, computing devices and
other components are integrated together.
• The interconnection of different components in our home
automation system are as shown in the figure given below.
10. Application Development
• Using all the information from previous steps, we will develop the
application (code) for the IoT system.
• The application interface for home automation system is shown
below.
Control Flow
Control Flow
• Python package is hierarchical file structure that consists of # skimage package listing
modules and subpackages. skimage/ Top level package
__init__.py Treat directory as a package
• Packages allow better organization of modules related to a single
application environment. color/ color color subpackage
__init__.py
colorconv.py
colorlabel.py
rgb_colors.py
• Python allows reading and writing to files using the file object.
• The open(filename, mode) function is used to get a file
object.
• The mode can be read (r), write (w), append (a), read and
write (r+ or w+), read-binary (rb), write-binary (wb), etc.
• After the file contents have been read the close function is
called which closes the file object.
File Handling - Examples
Ex: To use seek function to set the position of the file pointer within
a file
Data.txt file: PrepBytes is an Ed-Tech Company
file=open(“data.txt”,’r’)
file.seek(10)
data=file.read(5)
print(data)
file.close() Output: is an
Python Packages of Interest for IoT
Python Packages of Interest for IoT
• JSON
• XML
• HTTPLib & URLLib
• SMTPLib
• NumPy
• Scikit-learn
Python Packages of Interest for IoT
JSON
• Java Script Object Notation (JSON) is an easy to read and write data-
interchange format.
• It is an alternative to XML and is easy for machines to parse and generate.
• It is built on two structures- a collection of name-value pairs (eg:-a Python
dictionary) and ordered lists of values (eg:- a Python List)
XML
• XML (Extensible Markup Language) is a data format for structured document
interchange.
• The Python minidom library(accessing and modifying XML documents)
provides a minimal implementation of the document object model interface
and has API similar to that in other languages.
Python Packages of Interest for IoT