Fabrikam presents an overview of using Python for Internet of Things (IoT) applications, highlighting the importance of Python due to its popularity and extensive libraries. The document details essential Python packages such as MRAA, Sockets, MySQLdb, NumPy, Matplotlib, Pandas, OpenCV, Tkinter, TensorFlow, and Paho-MQTT, which facilitate various IoT development tasks. Overall, Python is emphasized as a powerful programming language suitable for real-time analytics and processing in IoT solutions.
This section introduces IoT, the role of Python in its development, and outlines the key topics to be covered.
Explains the concept of IoT as connecting 'things' with embedded systems to the internet.
Discusses Python's significance in IoT fields like Wireless Sensor Networks and Big Data, emphasizing its libraries and popularity.
Details various Python packages used for IoT application development including mraa, sockets, mysql, numpy, matplotlib, pandas, opencv, tkinter, tensorflow, paho-mqtt.
FABRIKAM
About IoT
=
The recipefor the internet of things is very simple. A
'thing', which could literally be anything, is fitted with an
embedded system which connects it to the internet, in other
words, it has its own IP address.
4.
FABRIKAM
Why We usedPython
In IoT?
4
IoT occupies a place of importance in Wireless
Sensor Networks, Data Analytics, Cyber
Physical Systems, Big Data and Machine
Learning. It is also very focused on real time
analytics and processes. So, for the
development of an IoT solution, one would need
a programming language which is PYTHON.
Because PYTHON is most popular & has all the
facility to do all these things using his libraries.
FABRIKAM
mraa
This library isused in microcontrollers
like: IntelEdition, Radpberry pi. Being a
high level library, reading from and writing
to pins is a one line affair, and the library
also provides support for communication
protocols such as I2C, UART and SPI.
8.
FABRIKAM 8
Socket
sockets isa package which facilitates
networking over TCP/IP and UDP using
Python. One of the more interesting uses of
sockets, is that one can build their own
communication protocol using this package
as the base.
9.
FABRIKAM 9
mysqldb
A databaseis a no-brainer when it comes
to most IoT applications. For something
whose sole purpose is to send data to the
internet, for generating some prediction
using machine learning .
10.
FABRIKAM 10
numpy
This packageis use for scientific computing
using python. very similar to MatLab,
but much lighter. The feature I use most is to
read sensor data in bulk from my databases
and work on them using the inbuilt
functions.
11.
FABRIKAM 11
matplotlib
Data visualizationis one of the most
fundamental operations that can be
performed. It looks pretty impressive when
you convert a huge list of numbers to a
concise graph which can be understood
intuitively. matplotlib provides a number
of different styles of graphs that can be
plotted using local data.
12.
FABRIKAM 12
pandas
pandas isa package dedicated towards
data analysis. It is in essence, a local
alternative to using SQL databases which
is more suited to dealing with data as it is
built on numpy.
13.
FABRIKAM 13
opencv
Opencv isa Python port of the very
successful C library for image processing.
It contains high-level variants of familiar
image processing functions which make
photo analysis much easier. The big
brother of signal processing, image
processing.
14.
FABRIKAM 14
tkinter
Tkinter isa GUI development library
which comes bundled in with all
distributions of Python. This is extremely
useful in situations such as functionality
testing or repeated executions of the same
code.
15.
FABRIKAM 15
tensorflow
This libraryis also used for applying ML to
IoT Objects. This is a very useful library to
have if you deal with a lot of non linear
datasets or work extensively with decision
trees and neural networks.
16.
FABRIKAM 16
paho-mqtt
This libraryis used for fast communication
using MQTT protocol in
PYTHON. MQTT requests can be made
directly within Python, without any
additional setup to be done. Especially
useful in the prototyping stage.