SlideShare a Scribd company logo
IOT AND RASPBERRY PI
FOR DUMMIES
BY TONY GERDJIKOV
WWW.FACTORY3D.BG
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
IOT COMMUNICATION PROTOCOLS
• Ipv6/4
• Messaging via MQTT or ZeromQ
• Rest
• SOAP
WWW.FACTORY3D.BG
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
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
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
RPI FAMILIY
RPI B
RPI 2 B+
PRI
ZEROWWW.FACTORY3D.BG
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
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
OPERATING SYSTEMS
• Raspberrian
• Arch Linux
• Android
• Windows 10 IoT
• Ubuntu and other Linux distros.
WWW.FACTORY3D.BG
PROGRAMMING LANGUAGES
• Python
• JAVA
• C# for Windows IoT Core
WWW.FACTORY3D.BG
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
GPIO
WWW.FACTORY3D.BG
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
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
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
FIRST USEFULL LINUX COMMANDS
sudo apt-get update
sudo apt-get upgrade
sudo raspi-config
sudo apt-get install pip
sudo apt-get install python-dev python-
rpi.gpio
WWW.FACTORY3D.BG
HARDWARE HOWTO – T CLOBBER AND
CAMERA
WWW.FACTORY3D.BG
GETTING TO KNOW THE STARTUP KITS-
BREADBOARD
WWW.FACTORY3D.BG
GETTING TO KNOW THE STARTUP KITS-
TOUCH SCREEN
WWW.FACTORY3D.BG
GETTING TO KNOW THE STARTUP KITS –
DUPONT WIRES
WWW.FACTORY3D.BG
GETTING TO KNOW THE STARTUP KITS:
RESISTORS
WWW.FACTORY3D.BG
GETTING TO KNOW THE STARTUP KITS:
RESISTORS
WWW.FACTORY3D.BG
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
GETTING TO KNOW THE STARTUP KITS:
RELAYS
WWW.FACTORY3D.BG
PUTTING ALL THINGS TOGETHER…
WWW.FACTORY3D.BG
“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
CONNECTING A LED
import RPi.GPIO as
GPIO GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
GPIO.output(7,True)
WWW.FACTORY3D.BG
GPIO
WWW.FACTORY3D.BG
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
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
CONNECTING RELAY
WWW.FACTORY3D.BG
CONNECTING TEMPERATURE SENSOR
sudo apt-get install git-core
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
cd Adafruit_Python_DHT
sudo apt-get install build-essential python-dev
sudo python setup.py install
Getting the libraries:
WWW.FACTORY3D.BG
CONNECTING TEMPERATURE
#!/usr/bin/python
import sys
import Adafruit_DHT
while True:
humidity, temperature =
Adafruit_DHT.read_retry(11, 4)
print 'Temp: {0:0.1f} C Humidity:
{1:0.1f}%'.format(temperature, humidity)
WWW.FACTORY3D.BG
SERVO MOTOR
WWW.FACTORY3D.BG
SERVO MOTOR
WWW.FACTORY3D.BG
SERVO MOTOR
WWW.FACTORY3D.BG
SERVO MOTOR
WWW.FACTORY3D.BG
import time
def set(property, value):
try:
f = open("/sys/class/rpi-pwm/pwm0/" +
property, 'w')
f.write(value)
f.close()
except:
print("Error writing to: " + property + " value: " +
value)
def setServo(angle):
set("servo", str(angle))
set("delayed", "0")
set("mode", "servo")
set("servo_max", "180")
set("active", "1")
delay_period = 0.01
while True:
for angle in range(0, 180):
setServo(angle)
time.sleep(delay_period)
for angle in range(0, 180):
setServo(180 - angle)
time.sleep(delay_period)
MANAGE A DC MOTOR
WWW.FACTORY3D.BG
)
MANAGE A DC MOTOR
WWW.FACTORY3D.BG
• 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
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
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()
ANALOGS: ORANGE PI AND BANANA PI
WWW.FACTORY3D.BG
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
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
QUESTIONS ?
WWW.FACTORY3D.BG
USEFUL LINKS
• http://www.instructables.com/howto/raspberry+pi/
• https://www.adafruit.com/Raspberrypi
• https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-
a-servo-motor/software
• http://www.circuitbasics.com/how-to-set-up-the-dht11-humidity-
sensor-on-the-raspberry-pi/
• www.rs-online.com
• www.farnell.com
WWW.FACTORY3D.BG
USEFUL LINKS
• https://www.raspberrypi.org/magpi/issues/
• http://playground.arduino.cc/Bulgarian/Kombinirane
• https://pimylifeup.com/raspberry-pi-webcam-server/
• https://scanlibs.com/raspberry-pi-cookbook/
• https://pimylifeup.com/raspberry-pi-gpio/
• http://wiringpi.com/download-and-install/
WWW.FACTORY3D.BG
THANK YOU
WWW.FACTORY3D.BG

More Related Content

PPTX
PPTX
Raspberry Pi
DOCX
Abstract of raspberry pi
PDF
Home Automation Using RPI
PDF
Fullstack IoT Development
PPTX
Building a Raspberry Pi Robot with .NET 5, Blazor and SignalR - NDC London 2021
PPTX
Abhishek gi fi
PDF
Brillo/Weave Part 1: High Level Introduction
Raspberry Pi
Abstract of raspberry pi
Home Automation Using RPI
Fullstack IoT Development
Building a Raspberry Pi Robot with .NET 5, Blazor and SignalR - NDC London 2021
Abhishek gi fi
Brillo/Weave Part 1: High Level Introduction

What's hot (20)

PPTX
Smart surveillance monitoring system using raspberry pi and
PDF
IT Solution through IoT Development
PDF
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
PDF
The Rise of Maker Movement in Indonesia
PDF
Entrepreneurship through Making
PDF
Brillo/Weave Part 2: Deep Dive
PDF
Internet of Things - Technological Perspective
PDF
Echelon Indonesia 2016 - Innovation Through Opportunities in IoT & Arduino
PPTX
Building a Raspberry Pi Robot with Dot NET 6 Blazor and SignalR.pptx
PDF
Overview of Brillo and Weave
PDF
Ruby Arduino (RubyConfIndia 2013)
PPT
Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API
PDF
Brillo and weave - Android IOT
PDF
Boards for the IoT-Prototyping
PPTX
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR
PDF
Project humix overview - For Raspberry pi community meetup
PPTX
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - CSharp Co...
PPTX
Gi fi technology ppt
PDF
IRJET - AI based Smart Mirror
Smart surveillance monitoring system using raspberry pi and
IT Solution through IoT Development
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
The Rise of Maker Movement in Indonesia
Entrepreneurship through Making
Brillo/Weave Part 2: Deep Dive
Internet of Things - Technological Perspective
Echelon Indonesia 2016 - Innovation Through Opportunities in IoT & Arduino
Building a Raspberry Pi Robot with Dot NET 6 Blazor and SignalR.pptx
Overview of Brillo and Weave
Ruby Arduino (RubyConfIndia 2013)
Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API
Brillo and weave - Android IOT
Boards for the IoT-Prototyping
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR
Project humix overview - For Raspberry pi community meetup
Building a Raspberry Pi Robot Arm with .NET 5, Blazor and SignalR - CSharp Co...
Gi fi technology ppt
IRJET - AI based Smart Mirror
Ad

Viewers also liked (20)

PDF
Internet das coisas (IoT) com Raspberry, Python e Node.js
PPTX
Internet of things using Raspberry Pi
PDF
PHP: Atualidade e Tendências
PPTX
Web Socket
PPTX
Rasberry nodejs install_final
ODP
MQTT on Raspberry Pi with node.js
PDF
Leveraging Android for the Internet of Things with Eclipse M2M
PPTX
Beacons, Raspberry Pi & Node.js
PPTX
웹소켓 (WebSocket)
PDF
[16.01.05] node.js & mqtt
PDF
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
PPTX
Building the Internet of Things with Raspberry Pi
PDF
IoT Implementation of Sensor Data Acquisition in Surveillance Applications - ...
DOCX
What is Web-Scale IT ?
PPTX
Windows 10 IoT Core on Raspberry Pi 2 Usine IO
PDF
An introduction to workflow-based programming with Node-RED
PDF
How to bootstrap your IoT project
PPTX
Building your own RC Car with Raspberry Pi
PDF
[IoT] MAKE with Open H/W + Node.JS - 1st
PDF
An Overview of AWS IoT (November 2016)
Internet das coisas (IoT) com Raspberry, Python e Node.js
Internet of things using Raspberry Pi
PHP: Atualidade e Tendências
Web Socket
Rasberry nodejs install_final
MQTT on Raspberry Pi with node.js
Leveraging Android for the Internet of Things with Eclipse M2M
Beacons, Raspberry Pi & Node.js
웹소켓 (WebSocket)
[16.01.05] node.js & mqtt
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Building the Internet of Things with Raspberry Pi
IoT Implementation of Sensor Data Acquisition in Surveillance Applications - ...
What is Web-Scale IT ?
Windows 10 IoT Core on Raspberry Pi 2 Usine IO
An introduction to workflow-based programming with Node-RED
How to bootstrap your IoT project
Building your own RC Car with Raspberry Pi
[IoT] MAKE with Open H/W + Node.JS - 1st
An Overview of AWS IoT (November 2016)
Ad

Similar to Raspbeery PI IoT (20)

PPTX
Rasberry pie--- power point presentation
PPTX
IOT notes ....,.........
PDF
Iot lab manual new
PPTX
Capstone_Project.ppt
PPTX
RaspberryPi + IoT - Lab to switch on and off a light bulb
PPTX
Coffee & Pi - Intro to Pi Workshop
PPTX
IoT Unit-gsgsgsgasgGwaczxvxbxbbhhhh2.pptx
PPTX
Raspberry Pi - Unlocking New Ideas for Your Library
PDF
Raspberry Pi
PPTX
Raspberry Pi Internet of Things Robotics
PDF
IoTCourse.pptx
PDF
Chapter-7.pdf
PDF
Chapter-7_raspberryPi.pdf
PDF
Raspberry Pi
PPTX
2_RaspberryPi presentation.pptx
PDF
Chapter 7
PPTX
Coffee & Pi - intro to Pi Workshop
PDF
Internet of things aktu lab file
PPTX
chapter-7_ed.pptx
Rasberry pie--- power point presentation
IOT notes ....,.........
Iot lab manual new
Capstone_Project.ppt
RaspberryPi + IoT - Lab to switch on and off a light bulb
Coffee & Pi - Intro to Pi Workshop
IoT Unit-gsgsgsgasgGwaczxvxbxbbhhhh2.pptx
Raspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi
Raspberry Pi Internet of Things Robotics
IoTCourse.pptx
Chapter-7.pdf
Chapter-7_raspberryPi.pdf
Raspberry Pi
2_RaspberryPi presentation.pptx
Chapter 7
Coffee & Pi - intro to Pi Workshop
Internet of things aktu lab file
chapter-7_ed.pptx

Raspbeery PI IoT

  • 1. IOT AND RASPBERRY PI FOR DUMMIES BY TONY GERDJIKOV WWW.FACTORY3D.BG
  • 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
  • 3. IOT COMMUNICATION PROTOCOLS • Ipv6/4 • Messaging via MQTT or ZeromQ • Rest • SOAP 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
  • 7. RPI FAMILIY RPI B RPI 2 B+ PRI ZEROWWW.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
  • 10. OPERATING SYSTEMS • Raspberrian • Arch Linux • Android • Windows 10 IoT • Ubuntu and other Linux distros. WWW.FACTORY3D.BG
  • 11. PROGRAMMING LANGUAGES • Python • JAVA • C# for Windows IoT Core 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
  • 17. FIRST USEFULL LINUX COMMANDS sudo apt-get update sudo apt-get upgrade sudo raspi-config sudo apt-get install pip sudo apt-get install python-dev python- rpi.gpio WWW.FACTORY3D.BG
  • 18. HARDWARE HOWTO – T CLOBBER AND CAMERA WWW.FACTORY3D.BG
  • 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
  • 25. GETTING TO KNOW THE STARTUP KITS: RELAYS WWW.FACTORY3D.BG
  • 26. PUTTING ALL THINGS TOGETHER… WWW.FACTORY3D.BG
  • 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
  • 33. CONNECTING TEMPERATURE SENSOR sudo apt-get install git-core git clone https://github.com/adafruit/Adafruit_Python_DHT.git cd Adafruit_Python_DHT sudo apt-get install build-essential python-dev sudo python setup.py install Getting the libraries: WWW.FACTORY3D.BG
  • 34. CONNECTING TEMPERATURE #!/usr/bin/python import sys import Adafruit_DHT while True: humidity, temperature = Adafruit_DHT.read_retry(11, 4) print 'Temp: {0:0.1f} C Humidity: {1:0.1f}%'.format(temperature, humidity) WWW.FACTORY3D.BG
  • 38. SERVO MOTOR WWW.FACTORY3D.BG import time def set(property, value): try: f = open("/sys/class/rpi-pwm/pwm0/" + property, 'w') f.write(value) f.close() except: print("Error writing to: " + property + " value: " + value) def setServo(angle): set("servo", str(angle)) set("delayed", "0") set("mode", "servo") set("servo_max", "180") set("active", "1") delay_period = 0.01 while True: for angle in range(0, 180): setServo(angle) time.sleep(delay_period) for angle in range(0, 180): setServo(180 - angle) time.sleep(delay_period)
  • 39. MANAGE A DC MOTOR WWW.FACTORY3D.BG )
  • 40. MANAGE A DC MOTOR 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()
  • 44. ANALOGS: ORANGE PI AND BANANA PI WWW.FACTORY3D.BG
  • 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
  • 48. USEFUL LINKS • http://www.instructables.com/howto/raspberry+pi/ • https://www.adafruit.com/Raspberrypi • https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using- a-servo-motor/software • http://www.circuitbasics.com/how-to-set-up-the-dht11-humidity- sensor-on-the-raspberry-pi/ • www.rs-online.com • www.farnell.com WWW.FACTORY3D.BG
  • 49. USEFUL LINKS • https://www.raspberrypi.org/magpi/issues/ • http://playground.arduino.cc/Bulgarian/Kombinirane • https://pimylifeup.com/raspberry-pi-webcam-server/ • https://scanlibs.com/raspberry-pi-cookbook/ • https://pimylifeup.com/raspberry-pi-gpio/ • http://wiringpi.com/download-and-install/ WWW.FACTORY3D.BG

Editor's Notes

  • #2: First steps with Raspberry PI and IoT for dummies.
  • #6: Ziggbee Some of its main characteristics like low power consumption, low data rate, low cost, and high message throughput
  • #14: I2c inner connected circuit SPI serial periferial
  • #16: Write image will take a few minutes.
  • #17: Write image will take a few minutes.
  • #21: https://www.modmypi.com/blog/raspberry-pi-7-touch-screen-assembly-guide
  • #30: I2c inner connected circuit SPI serial periferial
  • #39: Press Control +C to stop the program.
  • #40: Press Control +C to stop the program.
  • #41: Press Control +C to stop the program.
  • #42: MQTT – message queue telemetry transport.
  • #43: Arduino by running 'ls -lrt /dev/tty*'. On my Raspberry Pi, it was listed as /dev/ttyUSB0. Remember this value for later.
  • #44: sudo apt-get install python-pip python-serial sudo pip install pyfirmata
  • #45: Orange PI and Banana PI
  • #46: Towa wizda li wi se mnogo slojno ? https://cayenne.mydevices.com
  • #47: https://youtu.be/J9zqvGWB5tM