SlideShare a Scribd company logo
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
W H E N W E B H I T M I C R O C O N T R O L L E R S
Making IOT
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Agenda
 A Bit About Me
 Intro
 Basics
 Usage Scenarios
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Ex
Dev
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
‫זאת‬ ‫ובכל‬,‫עבודה‬
‫ולוחצים‬ ‫לחוצים‬ ‫לקוחות‬
‫משעממים‬ ‫פרוייקטים‬
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
‫טכניקה‬ ‫ולא‬ ‫תוכן‬
‫אפס‬ ‫סכום‬ ‫משחק‬ ‫ולא‬ ‫משחקיות‬
‫יצרנות‬ ‫רק‬ ‫ולא‬ ‫ויצירה‬ ‫יצירתיות‬
‫דיו‬ ‫מושחז‬ ‫הגרזן‬,‫לחטוב‬ ‫עץ‬ ‫למצוא‬ ‫זמן‬
‫בסביבות‬2010‫ארדואינו‬ ‫השם‬ ‫את‬ ‫לראשונה‬ ‫שמעתי‬
‫יותר‬ ‫קצת‬ ‫חיפשתי‬
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
‫מופלאה‬ ‫התמכרות‬ ‫של‬ ‫תחילתה‬
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Arduino!
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
‫אינטראקציה‬ ‫פרוייקטי‬-‫אדר‬ ‫דורי‬
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Experience Design
 Digi-Physi
 “Garage Studio”
‫לסטודיו‬ ‫העת‬ ‫בשלה‬!
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Maker
 Geekcon, Arduino, industrial design
 Invention, Creation, Imagination
 Experience engineer
 Creative Coder
 Makathon Organizer
 Robotic Educator
 Project Mentor
 …
ForReal Team
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
G E T T I N G S T A R T E D W I T H A R D U I N O
IOT Intro
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Internet
Computers, connected through Internet protocols
Display or manipulate documents
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Internet of Things (IoT)
Computers, sensors and actuators connected
through Internet protocols
Measure or manipulate physical properties
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
IoT Reference Model
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
IOT Basics
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Ardu-XXX
 low performance microcontrollers
 IO: GPIOs
 Arduino, PIC, Basic Stamp, …
 ARM-based
 high performance microcontrollers
 IO: GPIOs
 Teensy, Arduino ZERO, …
 XXX-Berry
 Trimmed down Linux Distros
 IO: usb, hdmi, ...
 Raspie, Hackberry, ..
 High Rollers
 Full Linux Players
 IO: whatever
 Intel Galileo & Edison, Google (Android/Brillo), Samsung ARTIK
Hardware
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 IoT hardware has a pretty basic interface to the real
world
 GPIO: read/write boolean voltage levels
 Analog input: sensors
 Fast switching
 Interaction
 Measure:
read sensor value from input pin
 Process:
translate data models
 Manipulate:
write actuator value to output pin
Hardware
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Ethernet (built-in or shield), plug it in anywhere
 Wi-Fi (module), configured once per location
 3G (module), configured once, easy to use
 Bluetooth/BLE (module), via 3G/Wi-Fi of phone
 ZigBee (module), via ZigBee gateway
 USB (built-in), via desktop computer
Connectivity
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Energy
Wall socket, Power over Ethernet (w/ adapters),
batteries (direct or Minty Boost USB charger), LiPo
batteries (also shields), solar panels, …
Low power: lets hardware sleep to save energy
Future: new battery technologies, ultra low power
hardware, energy harvesting
Note: Moore’s law does not apply to batteries
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Usage Scenarios
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Accelerometer were only the beginning
 Remember “Smart Alarm Clocks”?
 QS
 Physical - accelerometers
 Cognitive: EEG sensors
 Behavioral Correlation Analyzers?
 Heuristical/Neural
 [[User Story]]
Data Aggregation, Harvesting &
Presentation
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Xively
 Plot.ly
Data Aggregation, Harvesting &
Presentation
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Pachube / Xively
The Pachube (now Xively) service lets you store,
monitor and share sensor data in open formats
PUT /v2/feeds/<your feed id>.csv HTTP/1.1rn
Host: api.xively.comrn
X-ApiKey: <your API key>rn
Content-Length: <content length>rn
rn
<sensor name>,<sensor value>
GET /v2/feeds/<feed id>.json HTTP/1.1rn
Host and X-ApiKey as above…rnrn
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
#include <Ethernet.h>
#include <SPI.h>
#include "plotly_streaming_ethernet.h"
// Sign up to plotly here: https://plot.ly
// View your API key and stream tokens here: https://plot.ly/settings
#define nTraces 2
// View your tokens here: https://plot.ly/settings
// Supply as many tokens as data traces
// e.g. if you want to ploty A0 and A1 vs time, supply two tokens
char *tokens[nTraces] = {"a1b1c1d1e1f1", "a2b2c2d2e2f2"};
// arguments: username, api key, streaming token, filename
plotly graph = plotly("zvika.markfeld", “********", tokens, "analog", nTraces);
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte my_ip[] = { 199, 168, 222, 18 }; // google will tell you: "public ip address"
void startEthernet(){
Serial.println("... Initializing ethernet");
if(Ethernet.begin(mac) == 0){
Serial.println("... Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, my_ip);
}
Serial.println("... Done initializing ethernet");
delay(1000);
}
Plot.ly
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
startEthernet();
graph.fileopt = "overwrite"; // See the "Usage" section in https://github.com/plotly/arduino-api
for details
bool success;
success = graph.init();
if(!success) {
Serial.println("Error! ");
while(true);
}
graph.openStream();
}
unsigned long x;
int y;
void loop() {
graph.plot(millis(), analogRead(A0), tokens[0]);
graph.plot(millis(), analogRead(A1), tokens[1]);
delay(50);
}
Plot.ly
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 We people LOVE remote control!
Realtime Home Automation
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Firmata
 S4A, IOIO, NodeJS/Johnny5
 Teleduino
 Web / JS / Bookmark Scripting
Realtime Home Automation
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Teleduino
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Game Changer
 Super low cost (~3 USD)
 LUA compliant
 Arduino compliant
 Complete Solution
 Forkable: NodeMCU
ESP8266
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
wifi.setmode(wifi.STATION)
wifi.sta.config("YOUR_NETWORK_NAME","YOUR_NETWORK_PASSWORD")
print(wifi.sta.getip())
led1 = 3
led2 = 4
gpio.mode(led1, gpio.OUTPUT)
gpio.mode(led2, gpio.OUTPUT)
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive", function(client,request)
local buf = "";
local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP");
if(method == nil)then
_, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP");
end
local _GET = {}
if (vars ~= nil)then
for k, v in string.gmatch(vars, "(%w+)=(%w+)&*") do
_GET[k] = v
end
end
LUA
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
uf = buf.."<h1> ESP8266 Web Server</h1>";
buf = buf.."<p>GPIO0 <a href="?pin=ON1"><button>ON</button></a>&nbsp;<a
href="?pin=OFF1"><button>OFF</button></a></p>";
buf = buf.."<p>GPIO2 <a href="?pin=ON2"><button>ON</button></a>&nbsp;<a
href="?pin=OFF2"><button>OFF</button></a></p>";
local _on,_off = "",""
if(_GET.pin == "ON1")then
gpio.write(led1, gpio.HIGH);
elseif(_GET.pin == "OFF1")then
gpio.write(led1, gpio.LOW);
elseif(_GET.pin == "ON2")then
gpio.write(led2, gpio.HIGH);
elseif(_GET.pin == "OFF2")then
gpio.write(led2, gpio.LOW);
end
client:send(buf);
client:close();
collectgarbage();
end)
end)
LUA
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 OAuth2 / SSL / …
 Temboo: Gmail, FB, Twitter
 IFTTT / Mashups
Web2.0 Invocations / Callbacks
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
/* Setup shield-specific #include statements */
#include <SPI.h>
#include <Dhcp.h>
#include <Dns.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <Temboo.h>
#include "TembooAccount.h" // Contains Temboo account information
byte ethernetMACAddress[] = ETHERNET_SHIELD_MAC;
EthernetClient client;
int numRuns = 1; // Execution count, so this doesn't run forever
int maxRuns = 10; // Maximum number of times the Choreo should be executed
Arduino Mail Sender
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
void setup() {
Serial.begin(9600);
// For debugging, wait until the serial console is connected
delay(4000);
while(!Serial);
Serial.print("DHCP:");
if (Ethernet.begin(ethernetMACAddress) == 0) {
Serial.println("FAIL");
while(true);
}
Serial.println("OK");
delay(5000);
Serial.println("Setup complete.n");
}
Arduino Mail Sender
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
void loop() {
if (numRuns <= maxRuns) {
Serial.println("Running SendMessage - Run #" + String(numRuns++));
TembooChoreo SendMessageChoreo(client);
// Invoke the Temboo client
SendMessageChoreo.begin();
// Set Temboo account credentials
SendMessageChoreo.setAccountName(TEMBOO_ACCOUNT);
SendMessageChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendMessageChoreo.setAppKey(TEMBOO_APP_KEY);
// Set Choreo inputs
String ClientIDValue = "zakakflemvrid";
SendMessageChoreo.addInput("ClientID", ClientIDValue);
Arduino Mail Sender
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
// Identify the Choreo to run
SendMessageChoreo.setChoreo("/Library/Google/Gmailv2/Messages/SendMessage");
// Run the Choreo; when results are available, print them to serial
SendMessageChoreo.run();
while(SendMessageChoreo.available()) {
char c = SendMessageChoreo.read();
Serial.print(c);
}
SendMessageChoreo.close();
}
Serial.println("nWaiting...n"); delay(30000);
}
Arduino Mail Sender
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 23andMe
 Amazon
 AuthorizeNet
 Basecamp
 Bitly
 Box
 Bugzilla
 Clicky
 CloudMine
 ConstantContact
 CorpWatch
 DailyMed
 DataGov
 Delicious
 Disqus
 DonorsChoose
 Dropbox
 DuckDuckGo
Temboo Chreos
 Dwolla
 eBay
 EnviroFacts
 Facebook
 Factual
 FedEx
 FedSpending
 FilesAnywhere
 Fitbit
 Flickr
 Foursquare
 Genability
 GitHub
 Google
 GovTrack
 Highrise
 InfluenceExplorer
 Instagram
 Instapaper
 KhanAcademy
 Kiva
 Klout
 LastFm
 LinkedIn
 LittleSis
 MailChimp
 Microsoft
 Mixpanel
 MySQL
 Nexmo
 NOAA
 NPR
 NYTimes
 OneLogin
 PagerDuty
 Parse
 PayPal
 PostgreSQL
 RunKeeper
 Salesforce
 SchoolFinder
 SendGrid
 Socrata
 Stripe
 SunlightLabs
 Tumblr
 Twilio
 Twitter
 Uber
 UnlockPlaces
 USPS
 Withings
 WolframAlpha
 Wordnik
 Xively
 Yahoo
 Yelp
 YouTube
 Zendesk
 Zillow
 Zoho
 Utilities
 Labs
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Add physical dimension to your social feed
 Send E-Mail alerts for home security system
 Read newspapers and decide whether it’s going to be
a good day…
 Order an Uber cab whenever leaving the house
 Physical Trader
Choreo Example Scenarios
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
NodeMCU / Spark Core
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Connect to the wireless network
print(wifi.sta.getip())
--nil
wifi.setmode(wifi.STATION)
wifi.sta.config("SSID","password")
print(wifi.sta.getip())
--192.168.18.110
Arduino like IO access
pin = 1
gpio.mode(pin,gpio.OUTPUT)
gpio.write(pin,gpio.HIGH)
gpio.mode(pin,gpio.INPUT)
print(gpio.read(pin))
NodeMCU
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
HTTP Client
-- A simple http client
conn=net.createConnection(net.TCP, false)
conn:on("receive", function(conn, pl) print(pl) end)
conn:connect(80,"121.41.33.127")
conn:send("GET / HTTP/1.1rnHost: www.nodemcu.comrn"
.."Connection: keep-alivernAccept: */*rnrn")
HTTP Server
-- a simple http server
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
print(payload)
conn:send("<h1> Hello, NodeMCU.</h1>")
end)
end)
HTTP
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Mash-ups
A mash-up combines two or more Web services
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Mash-ups
 Once devices have APIs, they become scriptable
 Logic moves out of device, into the Cloud
 e.g. Web-enabled LED + Yahoo Weather API =
ambient weather notification
IoT enables physical mash-ups of things
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Online Physical Chess?
Custom Apps
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
 Advanced Data Analysis
 Mobile “Things”
Future
ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
Thank You!

More Related Content

Viewers also liked

Emil Racovita
Emil RacovitaEmil Racovita
Emil Racovita
Tone Ionela
 
Kolonialisme inggris
Kolonialisme inggrisKolonialisme inggris
Kolonialisme inggrisRiinii Riinii
 
Kelompok 3 bahasa indonesia
Kelompok 3 bahasa indonesiaKelompok 3 bahasa indonesia
Kelompok 3 bahasa indonesiaRiinii Riinii
 
bitbite etai granit
 bitbite etai granit  bitbite etai granit
bitbite etai granit
Rika Shoham
 
Візуалізація даних
Візуалізація данихВізуалізація даних
Візуалізація даних
Oksana Marets
 

Viewers also liked (10)

Emil Racovita
Emil RacovitaEmil Racovita
Emil Racovita
 
Yossi
YossiYossi
Yossi
 
Kolonialisme inggris
Kolonialisme inggrisKolonialisme inggris
Kolonialisme inggris
 
MensWearhouse_3728
MensWearhouse_3728MensWearhouse_3728
MensWearhouse_3728
 
Smita_CV
Smita_CVSmita_CV
Smita_CV
 
Resume Janet Anastasi
Resume Janet AnastasiResume Janet Anastasi
Resume Janet Anastasi
 
Kolonialisme barat
Kolonialisme baratKolonialisme barat
Kolonialisme barat
 
Kelompok 3 bahasa indonesia
Kelompok 3 bahasa indonesiaKelompok 3 bahasa indonesia
Kelompok 3 bahasa indonesia
 
bitbite etai granit
 bitbite etai granit  bitbite etai granit
bitbite etai granit
 
Візуалізація даних
Візуалізація данихВізуалізація даних
Візуалізація даних
 

Similar to Zvika markfeld

Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Amazon Web Services
 
Autonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoTAutonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoT
javafxpert
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Bruno Borges
 
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
Crocodile WebRTC SDK and Cloud Signalling Network
 
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Marco Antonio Maciel
 
The Java Carputer
The Java CarputerThe Java Carputer
The Java Carputer
Simon Ritter
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java Carputer
IndicThreads
 
Developing wearable technology apps quickly
Developing wearable technology apps quicklyDeveloping wearable technology apps quickly
Developing wearable technology apps quickly
Raul Chong
 
戦略を立てる機械学習
戦略を立てる機械学習戦略を立てる機械学習
戦略を立てる機械学習
Takashi Kato
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet
 
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
Satya Harish
 
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for AndroidApp Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
Qualcomm Developer Network
 
Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021
Chris Swan
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
Databricks
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kit
Steve Houël
 
IoT Use Cases with MapR
IoT Use Cases with MapRIoT Use Cases with MapR
IoT Use Cases with MapR
MapR Technologies
 
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Codemotion
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
Stefano Sanna
 

Similar to Zvika markfeld (20)

Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
Uber on Using Horovod for Distributed Deep Learning (AIM411) - AWS re:Invent ...
 
Autonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoTAutonomous Drone Development with Java and IoT
Autonomous Drone Development with Java and IoT
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
 
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
 
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
 
The Java Carputer
The Java CarputerThe Java Carputer
The Java Carputer
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java Carputer
 
Rsockets ofa12
Rsockets ofa12Rsockets ofa12
Rsockets ofa12
 
Developing wearable technology apps quickly
Developing wearable technology apps quicklyDeveloping wearable technology apps quickly
Developing wearable technology apps quickly
 
戦略を立てる機械学習
戦略を立てる機械学習戦略を立てる機械学習
戦略を立てる機械学習
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops Rolls
 
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
HH QUALCOMM using qualcomm® snapdragon™ llvm compiler to optimize apps for 32...
 
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for AndroidApp Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
App Optimizations Using Qualcomm Snapdragon LLVM Compiler for Android
 
Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
 
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kit
 
IoT Use Cases with MapR
IoT Use Cases with MapRIoT Use Cases with MapR
IoT Use Cases with MapR
 
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
 

Recently uploaded

GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 

Recently uploaded (20)

GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 

Zvika markfeld

  • 1. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com W H E N W E B H I T M I C R O C O N T R O L L E R S Making IOT
  • 2. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Agenda  A Bit About Me  Intro  Basics  Usage Scenarios
  • 3. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Ex Dev
  • 4. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com ‫זאת‬ ‫ובכל‬,‫עבודה‬ ‫ולוחצים‬ ‫לחוצים‬ ‫לקוחות‬ ‫משעממים‬ ‫פרוייקטים‬
  • 5. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com ‫טכניקה‬ ‫ולא‬ ‫תוכן‬ ‫אפס‬ ‫סכום‬ ‫משחק‬ ‫ולא‬ ‫משחקיות‬ ‫יצרנות‬ ‫רק‬ ‫ולא‬ ‫ויצירה‬ ‫יצירתיות‬ ‫דיו‬ ‫מושחז‬ ‫הגרזן‬,‫לחטוב‬ ‫עץ‬ ‫למצוא‬ ‫זמן‬ ‫בסביבות‬2010‫ארדואינו‬ ‫השם‬ ‫את‬ ‫לראשונה‬ ‫שמעתי‬ ‫יותר‬ ‫קצת‬ ‫חיפשתי‬
  • 6. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com ‫מופלאה‬ ‫התמכרות‬ ‫של‬ ‫תחילתה‬
  • 7. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Arduino!
  • 8. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
  • 9. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
  • 10. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com ‫אינטראקציה‬ ‫פרוייקטי‬-‫אדר‬ ‫דורי‬
  • 11. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Experience Design  Digi-Physi  “Garage Studio” ‫לסטודיו‬ ‫העת‬ ‫בשלה‬!
  • 12. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Maker  Geekcon, Arduino, industrial design  Invention, Creation, Imagination  Experience engineer  Creative Coder  Makathon Organizer  Robotic Educator  Project Mentor  … ForReal Team
  • 13. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
  • 14. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com
  • 15. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com G E T T I N G S T A R T E D W I T H A R D U I N O IOT Intro
  • 16. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Internet Computers, connected through Internet protocols Display or manipulate documents
  • 17. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Internet of Things (IoT) Computers, sensors and actuators connected through Internet protocols Measure or manipulate physical properties
  • 18. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com IoT Reference Model
  • 19. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com IOT Basics
  • 20. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Ardu-XXX  low performance microcontrollers  IO: GPIOs  Arduino, PIC, Basic Stamp, …  ARM-based  high performance microcontrollers  IO: GPIOs  Teensy, Arduino ZERO, …  XXX-Berry  Trimmed down Linux Distros  IO: usb, hdmi, ...  Raspie, Hackberry, ..  High Rollers  Full Linux Players  IO: whatever  Intel Galileo & Edison, Google (Android/Brillo), Samsung ARTIK Hardware
  • 21. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  IoT hardware has a pretty basic interface to the real world  GPIO: read/write boolean voltage levels  Analog input: sensors  Fast switching  Interaction  Measure: read sensor value from input pin  Process: translate data models  Manipulate: write actuator value to output pin Hardware
  • 22. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Ethernet (built-in or shield), plug it in anywhere  Wi-Fi (module), configured once per location  3G (module), configured once, easy to use  Bluetooth/BLE (module), via 3G/Wi-Fi of phone  ZigBee (module), via ZigBee gateway  USB (built-in), via desktop computer Connectivity
  • 23. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Energy Wall socket, Power over Ethernet (w/ adapters), batteries (direct or Minty Boost USB charger), LiPo batteries (also shields), solar panels, … Low power: lets hardware sleep to save energy Future: new battery technologies, ultra low power hardware, energy harvesting Note: Moore’s law does not apply to batteries
  • 24. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Usage Scenarios
  • 25. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Accelerometer were only the beginning  Remember “Smart Alarm Clocks”?  QS  Physical - accelerometers  Cognitive: EEG sensors  Behavioral Correlation Analyzers?  Heuristical/Neural  [[User Story]] Data Aggregation, Harvesting & Presentation
  • 26. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Xively  Plot.ly Data Aggregation, Harvesting & Presentation
  • 27. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Pachube / Xively The Pachube (now Xively) service lets you store, monitor and share sensor data in open formats PUT /v2/feeds/<your feed id>.csv HTTP/1.1rn Host: api.xively.comrn X-ApiKey: <your API key>rn Content-Length: <content length>rn rn <sensor name>,<sensor value> GET /v2/feeds/<feed id>.json HTTP/1.1rn Host and X-ApiKey as above…rnrn
  • 28. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com #include <Ethernet.h> #include <SPI.h> #include "plotly_streaming_ethernet.h" // Sign up to plotly here: https://plot.ly // View your API key and stream tokens here: https://plot.ly/settings #define nTraces 2 // View your tokens here: https://plot.ly/settings // Supply as many tokens as data traces // e.g. if you want to ploty A0 and A1 vs time, supply two tokens char *tokens[nTraces] = {"a1b1c1d1e1f1", "a2b2c2d2e2f2"}; // arguments: username, api key, streaming token, filename plotly graph = plotly("zvika.markfeld", “********", tokens, "analog", nTraces); byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; byte my_ip[] = { 199, 168, 222, 18 }; // google will tell you: "public ip address" void startEthernet(){ Serial.println("... Initializing ethernet"); if(Ethernet.begin(mac) == 0){ Serial.println("... Failed to configure Ethernet using DHCP"); // no point in carrying on, so do nothing forevermore: // try to congifure using IP address instead of DHCP: Ethernet.begin(mac, my_ip); } Serial.println("... Done initializing ethernet"); delay(1000); } Plot.ly
  • 29. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); startEthernet(); graph.fileopt = "overwrite"; // See the "Usage" section in https://github.com/plotly/arduino-api for details bool success; success = graph.init(); if(!success) { Serial.println("Error! "); while(true); } graph.openStream(); } unsigned long x; int y; void loop() { graph.plot(millis(), analogRead(A0), tokens[0]); graph.plot(millis(), analogRead(A1), tokens[1]); delay(50); } Plot.ly
  • 30. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  We people LOVE remote control! Realtime Home Automation
  • 31. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Firmata  S4A, IOIO, NodeJS/Johnny5  Teleduino  Web / JS / Bookmark Scripting Realtime Home Automation
  • 32. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Teleduino
  • 33. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Game Changer  Super low cost (~3 USD)  LUA compliant  Arduino compliant  Complete Solution  Forkable: NodeMCU ESP8266
  • 34. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com wifi.setmode(wifi.STATION) wifi.sta.config("YOUR_NETWORK_NAME","YOUR_NETWORK_PASSWORD") print(wifi.sta.getip()) led1 = 3 led2 = 4 gpio.mode(led1, gpio.OUTPUT) gpio.mode(led2, gpio.OUTPUT) srv=net.createServer(net.TCP) srv:listen(80,function(conn) conn:on("receive", function(client,request) local buf = ""; local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP"); if(method == nil)then _, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP"); end local _GET = {} if (vars ~= nil)then for k, v in string.gmatch(vars, "(%w+)=(%w+)&*") do _GET[k] = v end end LUA
  • 35. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com uf = buf.."<h1> ESP8266 Web Server</h1>"; buf = buf.."<p>GPIO0 <a href="?pin=ON1"><button>ON</button></a>&nbsp;<a href="?pin=OFF1"><button>OFF</button></a></p>"; buf = buf.."<p>GPIO2 <a href="?pin=ON2"><button>ON</button></a>&nbsp;<a href="?pin=OFF2"><button>OFF</button></a></p>"; local _on,_off = "","" if(_GET.pin == "ON1")then gpio.write(led1, gpio.HIGH); elseif(_GET.pin == "OFF1")then gpio.write(led1, gpio.LOW); elseif(_GET.pin == "ON2")then gpio.write(led2, gpio.HIGH); elseif(_GET.pin == "OFF2")then gpio.write(led2, gpio.LOW); end client:send(buf); client:close(); collectgarbage(); end) end) LUA
  • 36. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  OAuth2 / SSL / …  Temboo: Gmail, FB, Twitter  IFTTT / Mashups Web2.0 Invocations / Callbacks
  • 37. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com /* Setup shield-specific #include statements */ #include <SPI.h> #include <Dhcp.h> #include <Dns.h> #include <Ethernet.h> #include <EthernetClient.h> #include <Temboo.h> #include "TembooAccount.h" // Contains Temboo account information byte ethernetMACAddress[] = ETHERNET_SHIELD_MAC; EthernetClient client; int numRuns = 1; // Execution count, so this doesn't run forever int maxRuns = 10; // Maximum number of times the Choreo should be executed Arduino Mail Sender
  • 38. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com void setup() { Serial.begin(9600); // For debugging, wait until the serial console is connected delay(4000); while(!Serial); Serial.print("DHCP:"); if (Ethernet.begin(ethernetMACAddress) == 0) { Serial.println("FAIL"); while(true); } Serial.println("OK"); delay(5000); Serial.println("Setup complete.n"); } Arduino Mail Sender
  • 39. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com void loop() { if (numRuns <= maxRuns) { Serial.println("Running SendMessage - Run #" + String(numRuns++)); TembooChoreo SendMessageChoreo(client); // Invoke the Temboo client SendMessageChoreo.begin(); // Set Temboo account credentials SendMessageChoreo.setAccountName(TEMBOO_ACCOUNT); SendMessageChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME); SendMessageChoreo.setAppKey(TEMBOO_APP_KEY); // Set Choreo inputs String ClientIDValue = "zakakflemvrid"; SendMessageChoreo.addInput("ClientID", ClientIDValue); Arduino Mail Sender
  • 40. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com // Identify the Choreo to run SendMessageChoreo.setChoreo("/Library/Google/Gmailv2/Messages/SendMessage"); // Run the Choreo; when results are available, print them to serial SendMessageChoreo.run(); while(SendMessageChoreo.available()) { char c = SendMessageChoreo.read(); Serial.print(c); } SendMessageChoreo.close(); } Serial.println("nWaiting...n"); delay(30000); } Arduino Mail Sender
  • 41. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  23andMe  Amazon  AuthorizeNet  Basecamp  Bitly  Box  Bugzilla  Clicky  CloudMine  ConstantContact  CorpWatch  DailyMed  DataGov  Delicious  Disqus  DonorsChoose  Dropbox  DuckDuckGo Temboo Chreos  Dwolla  eBay  EnviroFacts  Facebook  Factual  FedEx  FedSpending  FilesAnywhere  Fitbit  Flickr  Foursquare  Genability  GitHub  Google  GovTrack  Highrise  InfluenceExplorer  Instagram  Instapaper  KhanAcademy  Kiva  Klout  LastFm  LinkedIn  LittleSis  MailChimp  Microsoft  Mixpanel  MySQL  Nexmo  NOAA  NPR  NYTimes  OneLogin  PagerDuty  Parse  PayPal  PostgreSQL  RunKeeper  Salesforce  SchoolFinder  SendGrid  Socrata  Stripe  SunlightLabs  Tumblr  Twilio  Twitter  Uber  UnlockPlaces  USPS  Withings  WolframAlpha  Wordnik  Xively  Yahoo  Yelp  YouTube  Zendesk  Zillow  Zoho  Utilities  Labs
  • 42. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Add physical dimension to your social feed  Send E-Mail alerts for home security system  Read newspapers and decide whether it’s going to be a good day…  Order an Uber cab whenever leaving the house  Physical Trader Choreo Example Scenarios
  • 43. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com NodeMCU / Spark Core
  • 44. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Connect to the wireless network print(wifi.sta.getip()) --nil wifi.setmode(wifi.STATION) wifi.sta.config("SSID","password") print(wifi.sta.getip()) --192.168.18.110 Arduino like IO access pin = 1 gpio.mode(pin,gpio.OUTPUT) gpio.write(pin,gpio.HIGH) gpio.mode(pin,gpio.INPUT) print(gpio.read(pin)) NodeMCU
  • 45. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com HTTP Client -- A simple http client conn=net.createConnection(net.TCP, false) conn:on("receive", function(conn, pl) print(pl) end) conn:connect(80,"121.41.33.127") conn:send("GET / HTTP/1.1rnHost: www.nodemcu.comrn" .."Connection: keep-alivernAccept: */*rnrn") HTTP Server -- a simple http server srv=net.createServer(net.TCP) srv:listen(80,function(conn) conn:on("receive",function(conn,payload) print(payload) conn:send("<h1> Hello, NodeMCU.</h1>") end) end) HTTP
  • 46. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Mash-ups A mash-up combines two or more Web services
  • 47. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Mash-ups  Once devices have APIs, they become scriptable  Logic moves out of device, into the Cloud  e.g. Web-enabled LED + Yahoo Weather API = ambient weather notification IoT enables physical mash-ups of things
  • 48. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Online Physical Chess? Custom Apps
  • 49. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com  Advanced Data Analysis  Mobile “Things” Future
  • 50. ForReal Team 2014-15 | All rights reserved | www.forrealteam.com | learn.forrealteam.com Thank You!