Iot Report
Iot Report
on
INTERNET OF THINGS
(IOT)
Submitted in partial fulfillment of the requirements
for the award of the degree of
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION
Submitted By:
Sanyam Jain
2817291
Batch: 2017-2021)
1
CANDIDATE’S DECLARATION
I hereby declare that the work presented in this training report entitled “Internet of
Things (I.O.T)”, submitted in partial fulfillment of the requirement for the award of the
degree of Bachelor of Technology in Electronics and Communication, submitted to
Panipat Institute of Engineering & Technology, Kurukshetra University, Kurukshetra,
India is an authentic record of my own work carried out during the period from 17 June
2019 to 23 July 2019 under the guidance of Mr. Vipul Ror .
The work reported in this project report has not been submitted by me for the award
of any other degree or diploma.
2
CERTIFICATE
This is to certify that the summer training report (ECE-315N) entitled “Internet of
Things (I.O.T)” done by Sanyam Jain, Roll No. 2817291 is an authentic work carried out
by him at Sofcon India pvt. ltd. under my guidance. The matter embodied in this
training title/ project work has not been submitted earlier for the award of any degree
or diploma to the best of my knowledge and belief.
3
Acknowledgement
Working in the Sofcon India Pvt Ltd was interesting. During these six-weeks summer
training, I learnt a lot on Internet of Things, hands-on experience of Arduino ,
Raspberry pi, languages like python, html and php.
Further on, I want to thank the students and trainees in the Sofcon who made this
demanding time joyful but always efficient.
Sanyam Jain
4
5
List of Figures
Figure 1.2
Figure 1.3
Figure 2.1
Figure 2.2
The figures must be numbered as (chapter number.figure number). Suppose chapter number is 2 and
figure in the chapter 2 is 3 then figure must be numbered as Figure 2.3
6
List of Tables
Table 1.2
Table 2.1
The tables must be numbered as (chapter number.table number). Suppose chapter number is 1 and
table in the chapter 1 is 1 then table must be numbered as Table 1.1
7
List of Graphs
Graph 1.2
The graphs should be numbered as (chapter number.graph number). Suppose chapter number is 2 and
graph in the chapter 2 is 3 then graph must be numbered as Graph 2.3
8
Abbreviations
AE Analogy-based Estimation
AHF Attribute Hiding Factor
AIF Attribute Inheritance Factor
List all the abbreviations you have used in the project report/thesis/dissertation etc.
9
CONTENTS (16 PTS.)
Candidate's Declaration i
Certificate ii
Acknowledgement iii
Abstract iv
List of Figures v
List of Tables vi
Abbreviations viii
Chapter 1: INTRODUCTION 1
1.1 1
1.2 4
1.3 6
1.4 8
Chapter 2: 14
Examples of REFERENCES
[1] S. M. Metev and V. P. Veiko, Laser Assisted Microtechnology, 2nd ed., R. M. Osgood, Jr., Ed.
Berlin, Germany: Springer-Verlag, 1998.
[2] J. Breckling, Ed., The Analysis of Directional Time Series: Applications to Wind Speed and
Direction, ser. Lecture Notes in Statistics. Berlin, Germany: Springer, 1989, vol. 61.
[3] S. Zhang, C. Zhu, J. K. O. Sin, and P. K. T. Mok, “A novel ultrathin elevated channel low-
temperature poly-Si TFT,” IEEE Electron Device Lett., vol. 20, pp. 569–571, Nov. 1999.
[4] M. Wegmuller, J. P. von der Weid, P. Oberson, and N. Gisin, “High resolution fiber distributed
measurements with coherent OFDR,” in Proc. ECOC’00, 2000, paper 11.3.4, p. 109. [5] R. E.
Sorace, V. S. Reinhardt, and S. A. Vaughn, “High-speed digital-to-RF converter,” U.S. Patent 5
668 842, Sept. 16, 1997.
[6] (2002) The IEEE website. [Online]. Available: http://www.ieee.org/
11
Good quality white executive bond paper A4 size should be used for typing and duplication. Care
should be taken to avoid smudging while duplicating the copies.
Page Specification: (Written paper and source code)
Left margin – 1.5"
Right margin – 1"
Top margin – 1"
Bottom margin – 1"
Page numbers - All text pages as well as Program source code listing should be numbered at the
bottom center of the pages.
Normal Body Text: Font Size: 12, Times New Roman, 1½ Spacing, Justified. 6 point above and
below para spacing
Paragraph Heading: Font Size: 14, Times New Roman, Underlined, Left Aligned. 6 point above &
below spacing.
Chapter Heading: Font Size: 16, Times New Roman, Centre Aligned, 12 point above and below
spacing.
Binding: Project Report should be typed on one side of the page and binding should be spiral of the
report.
Figures & Graph: Figures and its caption should be center aligned. Figure caption should be of font
size: 12, Times New Roman, 1½ Spacing, 6 point above & below spacing.
Tables: Table content and its caption should be center aligned, font size: 12, Times New Roman;
Caption should have 1½ Spacing, 6 point above & below spacing.
Sequence of pages
First Page
Candidate declaration certificate should consists of names and roll numbers of student
Second Page
The Second page should contain a training certificate provided by the company where training
has undergone.
Third Page
The third page may include the Acknowledgement
Fourth
The Fourth page should contain an abstract of the Project report. The candidate may
emphasise here his contributions.
12
Fifth, Sixth and Seventh
In this page, list of figures, list of tables, list of graphs and photographs and notation must be
provided and abbreviations.
Important Note:
All the above pages are to be numbered in Roman numerals of lower case. Ex. i, ii, iii,
iv,…
The document/chapter pages must be numbered using numbers i.e. 1, 2, 3……
All the pages numbered in Roman numerals are to be placed before “Content Page” and
document/chapter pages numbered in natural numbers are to be placed after the
“Content Page”.
13
IntroductIon to the topIc
IOT is a system where physical devices are connected to each other with sensors
within and these items are in turn connected to the internet via wireless
connection. Internet of things will Connect non-living things with living things-
the vision of IOT is to connect everything starting from industrial equipment to
everyday objects.
The sorts of things extent from gas turbines to vehicles to utility meters. It can
likewise incorporate living beings, for example, plants, ranch creatures and
individuals. For instance, the Cow Tracking Project in Essex utilizes information
gathered from radio situating labels to screen dairy animals for ailment and
track conduct in the group.
Fundamentally anything you can connect a sensor and availability to can take an
interest in the new associated biological communities. Use sensors for data
connection- The physical articles that are being associated will have one or more
sensors. Every sensor will screen a particular condition, for example, area,
vibration, movement and temperature.
In IoT, these sensors will associate with each other and to frameworks that can
comprehend or present data from the sensor's information bolsters. These
sensors will give new data to an organization's frameworks and to individuals.
Before, individuals conveyed with individuals and with machines.
In very simple words, IOT, most commonly known as internet-of- things, is a
network of devices connected together in order to exchange information. The
devices are embedded with software, sensors and network connectivity which
will help them to collect and exchange data. The whole infrastructure creates an
opportunity for the machines to communicate with each other. The 28 devices
can be anything starting from cellphones, headphones, washing machines or any
electronic devices.
14
Overall, IOT is a giant network of connected devices and the relationship will be
between people-people, people-things and things to things.
IOT products are aimed at automating our lives. All the lights will be switched of
as soon as you step out of the house, your warehouse will send notifications as
soon it gets short of certain products and what not.
There are numerous points of interest of joining IoT into our lives, which can
help people, organizations, and society once a day. For people this new idea can
come in numerous structures including wellbeing, security, monetarily, and
consistently arranging.
The joining of IOT into the human services framework could end up being
inconceivably gainful for both an individual and a general public.
A chip could be actualized into every person, taking into consideration healing
centers to screen the indispensable indications of the patient. By following their
crucial signs, it could show regardless of whether genuine appraisal is vital.
With the majority of the data that is accessible on the Internet, it can likewise
unnerve individuals into trusting they require more care than what is truly
required. Healing centers as of now battle to survey and deal with the patients
that they have. By observing individual's wellbeing, it will permit them to judge
who needs essential consideration.
The Internet of Things can likewise help individuals with their own wellbeing.
ADT, which is a home security framework, permits people to screen their
security frameworks at home through their telephones, with the capacity to
control it. IOT can likewise work as a device that can spare individuals cash inside
their family units. In the event that their home apparatuses can convey, they can
work in a vitality effective way.
15
By permitting physical gadgets to impart, it is taking the information that is
separately gathered, sharing it, and afterward making an interpretation of the
data into approaches to make our present frameworks more productive.
Smart home automation and IoT are creating a lot of buzz in the IT industry.
Daily lives have been made simpler, better, and more comfortable with the
increasing number of smart homes and connected devices.
16
By 2020, it is expected that the global
al smart home market will reach around 40
billion dollars.. Now, these smart home devices range from anything like smart
kettles, refrigerators, and dryers to air conditioners and a range of safety and
security devices, like alarm systems and circuit secur
security cameras.
CLIENT-SEVER
SEVER COMPUTING
COMPUTING:
A server host runs one or more server programs which share their resources with
clients.
17
A client does not share any of its resour
resources,
ces, but requests a server's content or
service function. Clients therefore initiate communication sessions with servers
which await incoming requests.
Examples of computer applications that use the client client–server
server model
are Email, network printing
printing, and the World Wide Web.
AC TO DC VOLTAGE CONVERSION:
(220V TO 5V)
18
If VB >= VE THEN ACTIVE MODE else OFF MODE
19
Python
It is used for:
WHY PYTHON?
20
PYTHON SYNTAX COMPARED TO OTHER PROGRAMMING
LANGUAGES
DATATYPES IN PYHTON
Numbers Boolean
List Set
Strings Tuple
Dictionary
21
PYTHON LIST
List is an ordered sequence of items. It is one of the most used datatype in
Python and is very flexible. All the items in a list do not need to be of the same
type.
1. >>> a = [1,2,3]
2. >>> a[2]=4
3. >>> a
4. [1, 2, 4]
PYTHON TUPLE
Tuple is an ordered sequence of items same as list.The only difference is that
tuples are immutable. Tuples once created cannot be modified.
Tuples are used to write-protect data and are usually faster than list as it
cannot change dynamically.
PYTHON STRINGS
String is sequence of Unicode characters. We can use single quotes or double
quotes to represent strings. Multi-line strings can be denoted using triple
quotes, ''' or """.
1. >>> s = "This is a string"
2. >>> s = '''a multiline
Python Set
22
Set is an unordered collection of unique items. Set is defined by values
separated by comma inside braces { }. Items in a set are not ordered.
1. >>> a = {1,2,2,3,3,3}
2. >>> a
3. {1, 2, 3}
PYTHON DICTIONARY
Dictionary is an unordered collection of key-value pairs.
In Python, dictionaries are defined within braces {} with each item being a pair
in the form key:value. Key and value can be of any type.
1. >>> d = {1:'value','key':2}
2. >>> type(d)
3. <class 'dict'>
Functions help break our program into smaller and modular chunks. As our
program grows larger and larger, functions make it more organized and
manageable.
SYNTAX OF FUNCTION
def function_name(parameters):
"""docstring"""
statement(s)
23
CONVERSION BETWEEN DATA TYPES
We can convert between different data types by using different type conversion
functions like int(), float(), str() etc.
1. >>> float(5)
2. 5.0
Conversion from float to int will truncate the value (make it closer to zero).
1. >>> int(10.6)
2. 10
3. >>> int(-10.6)
4. -10
1. >>> float('2.5')
2. 2.5
3. >>> str(25)
4. '25'
5. >>> int('1p')
6. Traceback (most recent call last):
7. File "<string>", line 301, in runcode
8. File "<interactive input>", line 1, in <module>
9. ValueError: invalid literal for int() with base 10: '1p'
1. >>> set([1,2,3])
2. {1, 2, 3}
3. >>> tuple({5,6,7})
4. (5, 6, 7)
5. >>> list('hello')
6. ['h', 'e', 'l', 'l', 'o']
1. >>> dict([[1,2],[3,4]])
2. {1: 2, 3: 4}
3. >>> dict([(3,26),(4,44)])
4. {3: 26, 4: 44}
24
Python GUI – tkinter
Python offers multiple options for developing GUI (Graphical User Interface).
Out of all the GUI methods, tkinter is most commonly used method. It is a
standard Python interface to the Tk GUI toolkit shipped with Python. Python
with tkinter outputs the fastest and easiest way to create the GUI applications.
Creating a GUI using tkinter is an easy task.
To create a tkinter:
2. mainloop(): m.mainloop()
def equal():
ent.set(eval(var.get()))
root=Tk()
25
root.title("calculator")
ent=StringVar()
var=Entry(root,textvariable=ent,justify="left")
var.grid(row=0,column=0)
var7=Button(root,text=" 7 ",command =lambda:prt('7')).grid(row=1,column=0)
var8=Button(root,text=" 8 ",command = lambda:prt('8')).grid(row=1,column=1)
var9=Button(root,text=" 9 ",command = lambda:prt('9')).grid(row=1,column=2)
var10=Button(root,text=" +
",command=lambda:prt('+')).grid(row=1,column=3)
var4=Button(root,text=" 4 ",command = lambda:prt('4')).grid(row=2,column=0)
var5=Button(root,text=" 5 ",command = lambda:prt('5')).grid(row=2,column=1)
var6=Button(root,text=" 6 ",command = lambda:prt('6')).grid(row=2,column=2)
var11=Button(root,text=" - ",command=lambda:prt('-')).grid(row=2,column=3)
var1=Button(root,text=" 1 ",command = lambda:prt('1')).grid(row=3,column=0)
var2=Button(root,text=" 2 ",command = lambda:prt('2')).grid(row=3,column=1)
var3=Button(root,text=" 3 ",command = lambda:prt('3')).grid(row=3,column=2)
var12=Button(root,text=" * ",command=lambda:prt('*')).grid(row=3,column=3)
var13=Button(root,text=" delete ",command=clear).grid(row=4,column=0)
var0=Button(root,text=" 0 ",command = lambda:prt('0')).grid(row=4,column=1)
var15=Button(root,text=" = ",command=equal).grid(row=4,column=2)
var16=Button(root,text=" / ",command=lambda:prt('/')).grid(row=4,column=3)
var17=Button(root,text="clear all",command=delete).grid(row=5,column=0)
mainloop()
Output:
26
27
MICROCONTROLLER
It’s like a small computer on a single IC. It contains a processor core, ROM, RAM
and I/O pins dedicated to perform various tasks.
Microcontrollers are generally used in projects and applications that require
direct control of user.
As it has all the components needed in its single chip, it does not need any
external circuits to do its task so microcontrollers are heavily used in embedded
systems and major microcontroller manufacturing companies are making them
to be used in embedded market.
A microcontroller can be called the heart of embedded system.
Some examples of popular microcontrollers are 8051, AVR, PIC series of
microcontrollers,.
Fig: Above is architecture of 8051 microcontroller. And you can see all the required
components for a small project is present in a single chip.
28
MICROPROCESSOR
Microprocessor has only a CPU inside them in one or few Integrated Circuits.
Like microcontrollers it does not have RAM, ROM and other peripherals.
They are dependent on external circuits of peripherals to work. But
microprocessors are not made for specific task but they are required where
tasks are complex and tricky like development of software’s, games and other
applications that require high memory and where input and output are not
defined.
It may be called heart of a computer system.
Some examples of microprocessor are Pentium, I3, and I5 etc.
From this image of architecture of microprocessor it can be easily seen that it have
registers and ALU as processing unit and it does not have RAM, ROM in it.
29
What is the difference between microprocessor and
microcontroller?
EMBEDDED
.
Key difference in both of them is presence of external peripheral, where
microcontrollers have RAM, ROM, EEPROM embedded in it while we have to use
external circuits in case of microprocessors.
As all the peripheral of microcontroller are on single chip it is compact while
microprocessor is bulky.
Processing speed of microcontrollers is about 8 MHz to 50 MHz, but in contrary
processing speed of general microprocessors is above 1 GHz so it works much
faster than microcontrollers.
Microcontrollers are compact so it makes them favorable and efficient system
for small products and applications while microprocessors are bulky so they are
preferred for larger applications.
Tasks performed by microcontrollers are limited and generally less complex.
While task performed by microprocessors are software development, Game
development, website, documents making etc. which are generally more
complex so require more memory and speed so that’s why external ROM, RAM
are used with it.
Microcontrollers are based on Harvard architecture where program memory
and data memory are separate while microprocessors are based on von
Neumann model where program and data are stored in same memory module.
30
rASpBerrY pI
The new board in Raspberry Pi 3 Model B is capable of playing 1080p MP4 video
at 60 frames per second, which boost the Pi’s media center credentials.
The Raspberry Pi 3 comes with built-in Wi-Fi and Bluetooth which helps to also
support the wireless internet out of the box.
The Pi 3 board supports remote updates to Pi and also sharing images of
operating system between multiple computer machines like booting process can
31
be directly done by using a USB-attached hard drive or pen drive and also by
supporting booting from a network-attached file system.
32
33
Some Operating Systems That Can Be Run on Raspberry Pi
NOOBS
The Raspberry Pi supports several OSes and as such usually comes without one.
Most of the time, however, it ships with an SD card that includes NOOBS (New
Out Of the Box Software) – an OS that includes of a variety of Operating
Systems from which you can choose which to or you to choose which to run on
your Raspberry Pi setup.
RASPBIAN
It is a Debian-based engineered especially for the Raspberry Pi and it is the
perfect general-purpose OS for Raspberry users.
It employs the Openbox stacking window manager and the Pi Improved
Xwindows Environment Lightweight coupled with a number of pre-installed
software which includes Minecraft Pi, Java, Mathematica, and Chromium.
Raspbian is the Raspberry foundation’s official supported OS and is capable of
accomplishing any task you throw at it.
UBUNTU CORE
It is the version of Ubuntu designed for Internet of
Things applications. Ubuntu is the most popular Linux-based Operating System
in the world with over 20+ derivatives and given that it has an active and
welcoming forum, it will be easy to get up and running with Ubuntu Snappy
Core on your Raspberry Pi.
LINUTOP OS
It is a secure raspbian-based web kiosk and digital signage player. it is dedicated
to professionals with the need to deploy public internet stalls and digital
signage solutions using raspberries.this os is perfect if you run hotels,
restaurants, shops, city halls, offices, museums, etc. and it is compatible with
raspberry pi b, b+ and 2.
34
Some Programming Languages Ported to the Raspberry Pi
import time
led.setmode (led.BOARD)
35
led.setwarnings(False)
led.setup(3,led.OUT)
led.setup(5,led.OUT)
while True:
led.output(3,led.HIGH)
led.output(5,led.LOW)
time.sleep(1)
led.output(3,led.LOW)
led.output(5,led.HIGH)
36
37
ArduIno
An Arduino is a microcontroller motherboard. A microcontroller is a simple
computer in that, only one program can be run at a time. It is very easy to use.
Arduino is an open-source and prototype platform which is based on software
and hardware. It is easy to use. Arduino is the overall microcontroller
motherboard and it has ready-made software called Arduino IDE (Integrated
Development Environment), this software is used to write and upload the
computer program code to the physical board.
Some of the features of Arduino are as listed below:
Microcontroller motherboard in Arduino is capable to read the analog /digital
input signals from different sensors and then convert those signals into an
output process like turning LED on/off, activating a motor, etc.
The user can control the functions of a board by sending signals (set of
instructions) to the microcontroller board using Arduino IDE software.
Arduino does not require any extra piece of hardware/programmer whenever to
want to load a new piece of program to the board. It can be done by using a USB
cable.
Since Arduino IDE uses an easier version of C++, it is very easy to learn the
programming language to program.
38
39
FIGURE : PIN DIAGRAM OF ARDUINO UNO
RASPBERRY PI vs ARDUINO
Both Raspberry Pi 3 vs Arduino are popular choices in the market; let us discuss some
of the major Difference Between Raspberry Pi 3 vs Arduino:
1. The Raspberry Pi 3 is a series of single Board Computer. The single board
consists of a fully functional computer with its dedicated memory, processor
and it runs an operating system (runs on Linux). Whereas Arduino is a
Microcontroller board and this board is not as powerful as Raspberry Pi 3 single
board computers, but a microcontroller board can be great for quick setups.
2. The Raspberry Pi 3 is so faster than the Arduino, means Raspberry Pi 3 has 1.2
GHz whereas Arduino has only 16 MHz.This helps to process the tasks like
playing videos, surfing the web, listening to music, etc. very fast compared to
Arduino.
3. Arduino is a simple approach and more attractive for building a project. The
Arduino has a convenient and user-friendly time interfacing with analog
sensors, motor, or other components, whereas Raspberry Pi 3 has a very
40
complicated path to get sensor readings such as installing software, libraries,
etc.
4. The Raspberry Pi 3 is designed to run operating systems whereas Arduino is not
designed to run on operating systems.
41
Data transmission
Data transmission refers to the process of transferring data between two or
more digital devices. Data is transmitted from one device to another in analog
or digital format. Basically, data transmission enables devices or components
within devices to speak to each other.
Data is transferred in the form of bits between two or more digital devices.
There are two methods used to transmit data between digital devices: serial
transmission and parallel transmission. Serial data transmission sends data
bits one after another over a single channel. Parallel data transmission sends
multiple data bits at the same time over multiple channels.
When data is sent or received using serial data transmission, the data bits are
organized in a specific order, since they can only be sent one after another.
The order of the data bits is important as it dictates how the transmission is
organized when it is received. It is viewed as a reliable data transmission
method because a data bit is only sent if the previous data bit has already
been received.
When data is sent using parallel data transmission, multiple data bits are
transmitted over multiple channels at the same time. This means that data can
be sent much faster than using serial transmission methods.
it is easier to program;
and data is sent faster.
COMMUNICATION PROTOCOLS:
UART INTERFACE
SPI INTERFACE
As shown in the figure one slave is connected with one master device. Clock is
generated by master device for synchronization of data transfer. It is also
possible to connected more than one slave device with single master for
communication. SPI interface operates in either half or full duplex mode. SPI is
the short form of Serial Peripheral interface. The figure-2 depicts SPI interface
between master and slave devices.
45
It has four main lines as described below.
MOSI - Master Output Slave Input, it is used to transfer data from master
device to slave device.
MISO - Master Input Slave Output, it is used to transfer data from slave device
to master device.
SCLK - Serial Clock, it is clock output from master and used for
synchronization.
SS - Slave Select, it is used by master device to select one slave out of
multiple slaves. It inserts active low signal to select the particular slave device.
I2C INTERFACE
• I2C stands for "inter-IC bus". It is also used as I2C for simplicity.
• I2C is a low speed and two wire serial data connection bus used in
IC(Integrated Circuit).
• It is used to run signals between ICs mounted on the same PCB (Printed
Circuit Board).
• It uses only two lines between multiple masters and multiple slaves viz. SDA
(Serial Data) and SCL (Serial Clock).
• I2C supports various data rates as per versions from 100 Kbps, 400 Kbps, 1
Mbps to 3.4 Mbps
• It is synchronous communication like SPI and unlike UART. Hence there is
46
common clock signal between masters and slaves.
• It uses start and stop bits and ACK bit for every 8 bits of data transfer.
Data bits,
Synchronization bits,
Parity bits,
and Baud rate.
Through the variety of these signaling mechanisms, you'll find that there's no
one way to send data serially. The protocol is highly configurable. The critical
part is making sure that both devices on a serial bus are configured to use
the exact same protocols.
Baud Rate
The baud rate specifies how fast data is sent over a serial line. It's usually
expressed in units of bits-per-second (bps). If you invert the baud rate, you can
find out just how long it takes to transmit a single bit. This value determines
how long the transmitter holds a serial line high/low or at what period the
receiving device samples its line.
Baud rates can be just about any value within reason. The only requirement is
that both devices operate at the same rate. One of the more common baud
rates, especially for simple stuff where speed isn't critical, is 9600 bps. Other
"standard" baud are 1200, 2400, 4800, 19200, 38400, 57600, and 115200.
The higher a baud rate goes, the faster data is sent/received, but there are
limits to how fast data can be transferred. You usually won't see speeds
exceeding 115200 - that's fast for most microcontrollers. Get too high, and
you'll begin to see errors on the receiving end, as clocks and sampling periods
just can't keep up.
47
Bit Rate
Actual rate of transfer of Bits per second
Framing the data
Each block (usually a byte) of data transmitted is actually sent in
a packet or frame of bits. Frames are created by appending
synchronization and parity bits to our data.
Data chunk
The real meat of every serial packet is the data it carries. We ambiguously call
this block of data a chunk, because its size isn't specifically stated. The amount
of data in each packet can be set to anything from 5 to 9 bits. Certainly, the
standard data size is your basic 8-bit byte, but other sizes have their uses. A 7-
bit data chunk can be more efficient than 8, especially if you're just transferring
7-bit ASCII characters.
Synchronization bits
The synchronization bits are two or three special bits transferred with each
chunk of data. They are the start bit and the stop bit(s). True to their name,
these bits mark the beginning and end of a packet. There's always only one
start bit, but the number of stop bits is configurable to either one or two (though
it's commonly left at one).
The start bit is always indicated by an idle data line going from 1 to 0, while the
stop bit(s) will transition back to the idle state by holding the line at 1.
Parity bits
Parity is a form of very simple, low-level error checking. It comes in two flavors:
odd or even. To produce the parity bit, all 5-9 bits of the data byte are added
up, and the evenness of the sum decides whether the bit is set or not. For
example, assuming parity is set to even and was being added to a data byte
like 0b01011101, which has an odd number of 1's (5), the parity bit would be
set to 1. Conversely, if the parity mode was set to odd, the parity bit would
be 0.
UART VS USART:
UART > Universal Asynchronous Receiver Transmitter
USART > Universal Synchronous Asynchronous Receiver Transmitter
48
A UART generates its data clock internally to the microcontroller and
synchronizes that clock with the data stream by using the start bit
transition. There is no incoming clock signal that is associated with the
data, so in order to properly receive the data stream the receiver needs
to know ahead of time what the baud rate should be.
A USART can be set up to run in synchronous mode. In this mode the
sending peripheral will generate a clock that the receiving peripheral can
recover from the data stream without knowing the baud rate ahead of
time.
The use of the external clock allows the data rate of the USART to be much
higher than that of a standard UART, reaching up to rates of 4 Mbps.
49
SoFtWAreS
CAYENNE
It is an app for smartphones and computers that allows you to control the
Raspberry Pi and soon also the Arduino through the use of an elegant
graphical interface and a solid nice communication protocol.
Add and remotely control sensors, motors, actuators, GPIO boards, and more
Customizable dashboards with drag-and-drop widgets for connection devices
Create triggers and threshold alerts for devices, events, and actions
Schedule one-time or multi-device events for easy automation
Quick and easy setup - connect your Pi in minutes
wget
https://cayenne.mydevices.com/dl/rpi_4ithnypn
7p.sh
sudo bash rpi_4ithnypn7p.sh -v
50
Step 4: See Your Device on Cayenne Dashboard
You can personalize the Dashboard of Cayenne by using the widgets. The
default Dashboard have CPU, Temp and RAM widget . These are the values of
your Raspberry Pi. You can see the temp and the work flow of Raspberry pi.
Then you can see the GPIO schedule. In the GPIO you can set every pin of
GPIO of Raspberry. You can set the pin like Output or Input.
Then you can activate the pin or read the value of the pin. The two values
are HIGH or LOW. This is valid for Input and Output.
About Proteus
52
It provides in-browser access to server-based Python and Bash command-
line interfaces, along with a code editor with syntax highlighting.
Program files can be transferred to and from the service using the user's
browser.
Web applications hosted by the service can be written using any WSGI-
based application framework.
53
54
55
56