2. WHAT IS IOT ?
• is the network of physical devices, vehicles, buildings and other
items—embedded with electronics, software, sensors, actuators, and
network connectivity that enable these objects to collect and
exchange data.
• The IoT allows objects to be sensed and controlled remotely across
existing network infrastructure
• encompasses technologies such as smart grids, smart homes,
intelligent transportation and smart cities.
• According to Gartner, Inc. (a technology research and advisory
corporation), there will be nearly 20.8 billion devices on the internet
of things by 2020.
WWW.FACTORY3D.BG
4. ENABLING TECHNOLOGIES
• RFID and near-field communication – In the 2000s, RFID was the dominant technology. Later, NFC
became dominant (NFC). NFC have become common in smartphones during the early 2010s, with uses such
as reading NFC tags or for access to public transportation.
• Rapid developments in the Optical technologies like Li-Fi, Cisco's 40 Gbit/s bidirectional optical technology
(BiDi[148]) may aid the development of IoT.
• Optical tags and quick response codes – This is used for low cost tagging. Phone cameras decode
QR code using image-processing techniques. In reality QR advertisement campaigns gives less turnout as
users need to have another application to read QR codes.
• Bluetooth low energy – This is one of the latest tech. All newly releasing smartphones have BLE
hardware in them. Tags based on BLE can signal their presence at a power budget that enables them to
operate for up to one year on a lithium coin cell battery. Bluetooth Beacons.
• Low energy wireless IP networks – embedded radio in system-on-a-chip designs, lower power WiFi,
sub-GHz radio in an ISM band, often using a compressed version of IPv6 called 6LowPAN.
WWW.FACTORY3D.BG
5. ENABLING TECHNOLOGIES
• ZigBee – This communication technology is based on the IEEE 802.15.4 2.4 GHz-band radio protocol to
implement physical and MAC layer for low-rate wireless Private Area Networks.
• Z-Wave – is a communication protocol that is mostly used in smart home applications. It uses a radio protocol in
the 900 MHz-band.
• Thread – Like ZigBee, this IoT communication technology relies on the IEEE 802.15.4 2.4 GHz-band radio protocol.
IPv6-compatible.
• LTE-Advanced – LTE-A is a high-speed communication specification for mobile networks. Compared to its
original LTE, LTE-A has been improved to have extended coverage, higher throughput and lower latency. One
important application of this technology is Vehicle-to-Vehicle (V2V) communications.
• WiFi-Direct – It is essentially WiFi for peer-to-peer communication without needing to have an access point. This
feature attracts IoT applications to be built on top of WiFi-Direct to get benefit from the speed of Wi Fi while they
experience lower latency.
• HomePlug – IOT communication over a home or building's power lines
• MoCA – communication over CATV-type coaxial cable
• Ethernet – This general purpose networking standard can be used to enable IOT communication over twisted pair
or fiber network links
WWW.FACTORY3D.BG
6. RASPBERRY PI
• The Raspberry Pi is a series of credit card-sized single-board
computers developed in the United Kingdom by the Raspberry Pi
Foundation
• All models feature a Broadcom system on a chip (SoC), which
includes an ARM compatible central processing unit (CPU) and an on
chip graphics processing unit (GPU, a VideoCore IV). CPU speed
ranges from 700 MHz to 1.2 GHz for the Pi 3
• On board memory range from 256 MB to 1 GB RAM.
• SD CARD Slot from 4 to 32 GB.WWW.FACTORY3D.BG
8. HISTORY
• The first generation (Pi 1) was released in February 2012 in
basic model A and a higher specification model B
• Raspberry Pi 2(RPI2) model B+ was released in February 2015
35 US$
• Raspberry Pi 3 (RPI3) model B in February 2016. 35 US$
• A cut down "compute" model was released in April 2014, and a
Pi Zero with smaller size and limited input/output (I/O),
general-purpose input/output (GPIO), abilities released in
November 2015 for 5 US$WWW.FACTORY3D.BG
9. RPI SPECIFICATION
• Most boards have between one and four USB slots,
• HDMI and composite video output, and a 3.5 mm phono jack
for audio
• Lower level output is provided by a number of GPIO pins which
support common protocols like I²C. Some models have an 8P8C
Ethernet port and
• the RPi 3 has on board Wi-Fi 802.11n and Bluetooth.
WWW.FACTORY3D.BG
12. MAKE YOUR RASPBERRY USEFULL
• Media Center with RaspBMC
• Home automation
• WEB/ DB Server/ Network Shared server
• WordPress
• 2D Games and Games development e.g MineCraft.
WWW.FACTORY3D.BG
14. INSTALLING RASPBERRIAN OS FROM
WINDOWS
https://www.raspberrypi.org/documentation/ins
tallation/installing-images
Windows:
• Insert SD Card in your reader
• Download the Win32DiskImager utility
• Extract downloaded OS image
• Open image file with Wind32DiskImager
• Select image file and SD card Drive
• Click “Write”
WWW.FACTORY3D.BG
15. INSTALLING RASPBERRIAN OS FROM LINUX
https://www.raspberrypi.org/documentation/ins
tallation/installing-images
Linux:
1. Run df -h to see what devices are currently
mounted.
2. Insert your SD card and run df -h again to
identify your card. e.g /dev/mmcblk0 or /dev/sdd
3. Unmount card with: umount /dev/sdd1
4. Sudo dd bs=4M if=2016-09-23-raspbian-jessie.img
of=/dev/sdd1
5. Make sure the device name is the name of the whole
SD card as described above, not just a partition
of it; for example, sdd, not sdds1
6. Check progress in new terminal with sudo pkill -
USR1 -n -x ddWWW.FACTORY3D.BG
16. INSTALLING WINDOWS 10 – IOT
1. Select your raspberry type PRI2 or RPI3 and
download image.
2. Download and start the Windows 10 IoT Core
Dashboard
3. Select your device, type, Wi Fi Settings and SD
Card.
4. Boot the RPI from the Card.
5. Download and Install Visual Studio 2015 on your PC
6. Download and Install C# samples.
WWW.FACTORY3D.BG
https://developer.microsoft.com/en-
us/windows/iot/getstarted
19. GETTING TO KNOW THE STARTUP KITS-
BREADBOARD
WWW.FACTORY3D.BG
20. GETTING TO KNOW THE STARTUP KITS-
TOUCH SCREEN
WWW.FACTORY3D.BG
21. GETTING TO KNOW THE STARTUP KITS –
DUPONT WIRES
WWW.FACTORY3D.BG
22. GETTING TO KNOW THE STARTUP KITS:
RESISTORS
WWW.FACTORY3D.BG
23. GETTING TO KNOW THE STARTUP KITS:
RESISTORS
WWW.FACTORY3D.BG
24. GETTING TO KNOW THE STARTUP KITS:
DC MOTORS, SERVO MOTORS, STEPPER MOTORS
WWW.FACTORY3D.BG
DC Motor
2 wires
Stepper Motor
4 wires
Servo Motor
3 wires
27. “HELLO WORD” PROGRAM ON PYTHON
1. Create a simple text file named
“myPython.py”
2. Enter the following text:
#!/usr/bin/env python
print “Hello Word from Python”
3. Save the file
4.Open terminal windows and execute command:
sudo chmod +X myPython.py
5.Run your python application with:
sudo python myPython.py
WWW.FACTORY3D.BG
28. CONNECTING A LED
import RPi.GPIO as
GPIO GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
GPIO.output(7,True)
WWW.FACTORY3D.BG
30. MAKING A BLINKING A LED
#import the GPIO and time package
import RPi.GPIO as GPIO
import time GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
# loop through 50 times, on/off for 1 second
for i in range(50):
GPIO.output(7,True)
time.sleep(1)
GPIO.output(7,False)
time.sleep(1)
GPIO.cleanup()
WWW.FACTORY3D.BG
31. CONNECTING BUTTON
import RPi.GPIO as GPIO
import time
# to use Raspberry Pi board pin numbers
GPIO.setmode(GPIO.BOARD)
# set up GPIO input channel
GPIO.setup(7, GPIO.IN)
while True:
inputValue = GPIO.input(7)
if input_value == False:
print ‘The button was pressed‘
#todo make led on.
else:
#todo meke led off.
WWW.FACTORY3D.BG
41. • RPI
• RPI
DISTRIBUTED ARCHITECTURE
Rest
Serve
r MQT
T
serve
r
UPNP
client
• RPI 1
MQT
T
client
• RPI (N)
MQT
T
clien
t
• Arduino
Device
MQT
T
client
• Android
Device
• Web
Browser
• Wi FI
route
r WEB
Serve
r
WWW.FACTORY3D.BG
42. RASPBERRY PI AND ARDUINO
WWW.FACTORY3D.BG
http://raspberrypi-
aa.github.io/session3/firmata.html
sudo apt-get install python-pip python-
serial
sudo pip install pyfirmata
1.Open Arduiono IDE:
2.Click File->Examples->Firmata-
>StandardFirmata 3.From the Tools->Board
menu, select the type of 4.Arduino you are
using. From the Tools->Serial Port menu,
choose the USB port to which your Arduino
is connected.
4.Click the upload button (it looks like a
right arrow, just next to the checkmark) and
wait for image to load
43. RASPBERRY PI AND ARDUINO – READ
DIGITAL AND ANALOG INPUTS.
WWW.FACTORY3D.BG
ANALOG:
>>> it = util.Iterator(board)
>>> it.start()
>>> board.analog[0].enable_reporting()
>>> board.analog[0].read()
>>> it.start()
DIGITAL:
>>> from pyfirmata import Arduino, util
>>> board = Arduino('/dev/ttyUSB0')
>>> board.digital[2].write(1)
>>> print board.digital[2].read()
45. USINNG CAYENE MY DEVICES
• IoT cloud for Raspberry Pi and Arduino
• Installs Agent and discovers devices
• Zero code configuration
• Support various known actuators, sensors and shields.
• Manage everything from your phone with cool widgets and
gauges.
WWW.FACTORY3D.BG
46. CAYENE INSTALLATION STEPS
• Goto https://cayenne.mydevices.com and register
• Download Android or IOS application for your phone
• Download Raspberry PI agent
• Discover your Raspberry PI
• Create a new project and start adding sensors / elements.
WWW.FACTORY3D.BG