Prof Sachin Gajjar Maker Community Boards For Iot
Prof Sachin Gajjar Maker Community Boards For Iot
Company
Internet Evolution Internet Evolution
LOGO
1
3/14/2017
Making S-E-N-S-E of IoT Internet of Things explained Why now? Enablers of the IoT
2
3/14/2017
Why Shoud I Care? Why Shoud I Care? Most Influential Internet Of Things Companies
Intel
M.C 115.41 B
3
3/14/2017
Most Influential Internet Of Things Companies Most Influential Internet Of Things Companies Most Influential Internet Of Things Companies
IBM
M.C 203.48 B Microsoft
Cisco
M.C 373 B
M.C 125.0B
Most Influential Internet Of Things Companies Forecasted Growth of IoT per Industries in 2025 Drivers of Smart Systems and IoT
Google
M.C 397B
4
3/14/2017
qArduino
qRaspberry Pi
qBeaglebone
qGalileo
qXBEE transceiver module David Cuartielles, Gianluca Martino, Tom Igoe, David Mellis, and Massimo Banzi
Arduino board was born in the classrooms
of the Interactive Design Institute in Ivrea, Italy
5
3/14/2017
int ledPin = 13
6
3/14/2017
Toolbar:
Verify, Upload,
New, Open, Save
Why?
7
3/14/2017
1. Download and install the Arduino IDE 2. Select the Microcontroller in the IDE
8
3/14/2017
Input
9
3/14/2017
qHas software stack that provides pre built processes qSend an SMS as soon an input is given to A0
that handle common aspects of IoT applications – pin of Arduino Uno
monitoring, data logging & plotting, notifications qYou'll need a Temboo account and a Twilio
(e-mail, SMS) , actuation account
qM2M-2-Cloud with support for messaging protocols qYou’ll need the latest version of Temboo's
MQTT, CoAP, HTTP Arduino library installed
qGenerate Your Sketch
q Log in to Temboo and go to the Twilio > SMSMessages > q Find your Twilio Account SID and Auth Token
SendSMS Choreo in the Temboo Library q Add details about Arduino shield to connect to the Internet
10
3/14/2017
When one logs in temboo account, this information is automatically populated in the sketch
q Fill your Twilio Account SID, Auth Token, other details….
11
3/14/2017
Connecting to Internet- IoT ThingSpeak way ZigBee Standard ZigBee and Other Wireless Technologies
q One way to transmit data wirelessly is through XBees qXBee – TX transmits data received through serial
q XBee is based on Zigbee standard input over the air
q XBee works at 3.3 volts, is a transceiver qXBee – RX receives data from air, sents through
q From ‘Digi International’ a family of radio modules serial interface
q ISM band of 2.4GHz
q P2P & Star topology
q Built in ADC for direct sensor interfacing
q Sleep mode (<10uA) – battery life up to few years
q Compact in size
12
3/14/2017
Configuring XBee
XBee Pin Description
Using XBee
q To connect XBee to Arduino/Computer XBee Shield/XBee Explorer
is used
q Explorer board has a USB-to-Serial converter Platforms to Configure Xbee
Xbee Shield
Xbee Explorer
XCTU Coolterm
(No coding required) (Coding required)
q When using Arduino with shield is used Arduino should have blank
code (basic template dumped in)
13
3/14/2017
5. Click on the module that appeared at left. X-CTU reads the configuration settings of
XBee.
6. To test another Xbee on the same computer and connect them wirelessly
Using XCTU Software
Settings
14
3/14/2017
PAN ID and address settings PAN ID and address settings PAN ID and address settings
8. Click “Switch to Consoles” to launch the serial window 9. Start a serial connection of each device by clicking the 10. Now type in console (RED) and notice it transmitted in
connect icon it will turn the console’s border to green. another console (BLUE)
11. Xbee Demo
15
3/14/2017
Raspberry Pi Zero
16
3/14/2017
q Power Supply
q HDMI cable *
q USB mouse and keyboard * OS Available
q SD memory card (min. 4 GB)
q SD memory card reader
q LAN cable **
17
3/14/2017
Downloading Disk Manager Burning the OS image Working with RPi in headless mode
Knowing the IP address of RPi The IP Scanner Options for connecting RPi
18
3/14/2017
q Download MobaXterm personal/home edition q Extract MobaXterm_Personal_6.0.exe file q In session settings, choose session type
http://mobaxterm.mobatek.net/download-home-edition.html q Select SSH
q Launch MobaXterm
q SSH Secure Shell/Secure Socket Shell is UNIX based command interface
q In MobaXterm, click Sessions -> New session for securely getting access to remote computer
q Select the LXDE desktop q In the login prompt enter RPi’s username/password
q Enter RPi IP address in remote host
q Default user is pi , and password is raspberry
19
3/14/2017
q RPi desktop on PC q Can also use Putty (prompt) to connect RPi to PC q Can also use VnC Server (screen) to connect Rpi to PC
Working with RPi in head mode Working with RPi in head mode Pre-installed programs in RPi
q There is RPi board, Monitor, keyboard, mouse, HDMI cable q BlueJ, an IDE for Java
q PLUGGING IN YOUR RASPBERRY PI q Free, simple to use,
q Slot in SD card into the SD card slot of RPi q Smaller and simpler interface than professional environments
like netbeans or eclipse
q Plug in USB keyboard and mouse in USB slots of RPi
q Geany, an IDE for almost any language
q Turn on monitor/TV, and select the HDMI input q C, Java, PHP, HTML, Python, Perl and Pascal
q Connect HDMI cable from RPi to monitor/TV q Greenfoot, IDE for Java
q To connect RPi to Internet, plug in an Ethernet cable into q A full IDE which includes project management, syntax
Ethernet port highlighting, and other tools common to most IDEs
q Finally, plug in the micro USB power supply to boot RPi q Publish your work both on and offline
q Mathematica, serious math on an RPi
q For technical
q With Mathematica Online, it is on cloud through any web
browser, and natively on all modern desktop systems
20
3/14/2017
21
3/14/2017
22
3/14/2017
Dashboard
For manual control of
inlet
For monitoring usage
Inlet control ON/OFF control based of water
on water in the tank Notification of
Water level through
SMS, e-mail, live on Circuit
dashboar
Diagram
Track of
Water
usage
23
3/14/2017
24
3/14/2017
FARMNET
GSM
Sensor 1
Sensor 2
Node Data Base
Server
1 Station
Actuation Control
Sensor n
|
|
- - - - - - - - - -Crop
- - -Crop - - - - - - - - - Drip Irrigation- - - -Crop
- - - - - - - - - - - - -Crop
--
|
| | Actuation
| Actuation | Data Control
|
| Control |
| |
Data
Crop
| Sensor 1
Sensor 1 |
Sensor 2
Sensor 2 |
Node | -- ---- Node 3
2 |
|
Sensor n
Crop
| Sensor n
GSM Shield
25
3/14/2017
26
3/14/2017
For projects and other information Sense HAT Installation Sense HAT Software Overview
q http://astro-pi.org/
q https://www.hackster.io/raspberry-pi/products/sense-hat
q https://www.raspberrypi.org/learning/astro-pi-
guide/emulation.md
q http://pythonhosted.org/sense-hat/ Install the Sense HAT software by opening a Terminal window and
entering the following commands (while connected to the Internet):
q https://github.com/RPi-Distro/python-sense-
hat/blob/master/examples/README.md
q http://pythonhosted.org/sense-hat/api/
q https://trinket.io/
q https://www.raspberrypi.org/learning/getting-started-with-the-
sense hat/worksheet/
q https://sense-emu.readthedocs.io/en/v1.0/index.html#
q http://pythonhosted.org/sense-hat/
27
3/14/2017
q The code can be run at https://trinket.io/sense-hat also q from sense_hat import SenseHat
q sense = SenseHat() //calling constructor
q sense.show_message("Hello world!")
q //object.function call
28
3/14/2017
29
3/14/2017
Sense-Hat code sample codes Reading Temperature on Sense-Hat Sense-Hat Code on Emulator
30
3/14/2017
Reading Humidity on Sense-Hat Sense-Hat Code on Emulator Getting Started with Joystick
Sense-Hat Code on Emulator Using 8*8 Led (Display Rainbow) Sense-Hat Code on Emulator
from colorsys import hsv_to_rgb
from time import sleep
from sense_emu import SenseHat
# Hues represent the spectrum of colors as values hat = SenseHat()
between 0 and 1. The range def scale(v):
# is circular so 0 represents red, ~0.2 is yellow, ~0.33 return int(v * 255)
is green, 0.5 is cyan, while True:
# ~0.66 is blue, ~0.84 is purple, and 1.0 is back to # Rotate the hues
red. These are the initial hues = [(h + 0.01) % 1.0 for h in hues]
# hues for each pixel in the display. # Convert the hues to RGB values
hues = [ pixels = [hsv_to_rgb(h, 1.0, 1.0) for h in hues]
0.00, 0.00, 0.06, 0.13, 0.20, 0.27, 0.34, 0.41, # hsv_to_rgb returns 0..1 floats; convert to ints in the
0.00, 0.06, 0.13, 0.21, 0.28, 0.35, 0.42, 0.49, range 0..255
0.07, 0.14, 0.21, 0.28, 0.35, 0.42, 0.50, 0.57, pixels = [(scale(r), scale(g), scale(b)) for r, g, b in
0.15, 0.22, 0.29, 0.36, 0.43, 0.50, 0.57, 0.64, pixels]
0.22, 0.29, 0.36, 0.44, 0.51, 0.58, 0.65, 0.72, # Update the display
0.30, 0.37, 0.44, 0.51, 0.58, 0.66, 0.73, 0.80, hat.set_pixels(pixels)
0.38, 0.45, 0.52, 0.59, 0.66, 0.73, 0.80, 0.87, sleep(0.04)
0.45, 0.52, 0.60, 0.67, 0.74, 0.81, 0.88, 0.95,
]
31
3/14/2017
q http://en.wikipedia.org/wiki/Raspberry_Pi q http://www.adafruit.com/products/859
q http://elinux.org/Rpi_Datasheet_201_Raspberry_Pi_Computer q http://elinux.org/RPi_VerifiedPeripherals
q http://elinux.org/RPi_Hardware q http://elinux.org/Rpi_Low-level_peripherals
q http://elinux.org/R-Pi_Hub q http://www.raspberrypi.org/downloads
q http://www.element14.com/community/docs/DOC-43016/l/broadcom- q http://elinux.org/RPi_Easy_SD_Card_Setup#Copying_an_image_to_th
datasheet-for-bcm2835-soc-used-in-raspberry-pi e_SD_Card_in_Linux_.28command_line.29
q http://en.wikipedia.org/wiki/List_of_single-board_computers q http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-
q http://www.sakoman.com/OMAP/microsd-card-perfomance-test- Burning/Win32-Disk-Imager.shtml
results.html q http://www.h2g2.com/approved_entry/A13735596
q http://elinux.org/RPi_VerifiedPeripherals q http://www.raspberrypi.org/faqs
q http://elinux.org/Rpi_Low-level_peripherals q https://thepihut.com/products/raspberry-pi-zero?variant=14062734980
q http://elinux.org/RPi_Cases q https://thepihut.com/products/raspberry-pi-zero?variant=14062734980
Thank You
32