SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
Rat Pack Remote Control
a technical Internet of Things (tm) basics primer
Sven Kräuter - @SVEN_KR
Codemotion Berlin | 05/2013
making things happen.
who is sven kräuter?
sven Kräuter is an
agile & lean coach,
software developer
and a maker.
what is THE INTERNET OF THINGS?
THE INTERNET OF
THINGS IS...
making things happen.
the internet of things (Iot)
objects
communicating
via the internet
build the iot.
making things happen.
the Iot
good bye
„one size fits all“.
making things happen.
the Iot
hello
„dedicated devices“.
video Source:https://vimeo.com/21387481
SPOTIFY BOX.
making things happen.
video Source: sven‘s smartphone
M&C BULLI.
making things happen.
making things happen.
Category A Iot
interaction with existing
online services.
making things happen.
Category A Iot
representation of
known information
in a new way.
video Source: http://vimeo.com/45980092
GOOD NIGHT LAMP.
making things happen.
making things happen.
Category B Iot
establishing new
online services.
making things happen.
Category B Iot
representation of
new information
in a new way.
nice but what‘s the purpose?
let me elaborate...
making things happen.
trend Always On
increasing amount of
real time data &
screens do not scale.
making things happen.
screens do not scale
representation of data
on a screen
is just one possibility.
making things happen.
screens do not scale
it is not necessarily
the best possibility.
video Source: https://vimeo.com/49425556
NO PLACE LIKE HOME.
making things happen.
what THE INTERNET OF THINGS is
THE INTERNET OF THINGS IS
enabling you to communicate
beyond the boundaries
of screens and keyboards.
what THE INTERNET OF THINGS is
it IS enabling you to
communicate online in a
more intuitive &
more effective way.
Nice. But HOW DOES IT WORK?
Surprisingly
simple...
making things happen.
The Internet
THE INTERNET (TM)
Hello there! Send
Hello there!
HTTPHTTP
HTTP
making things happen.
The Internet OF Things Category A
THE INTERNET OF THINGS (TM)
I want to go to.... Send
HTTPHTTP
HTTP
Photo Source: flickr.com/photos/bike/5153033439/in/photostream/
making things happen.
The Internet OF Things Category B
Photo Sources: flickr.com/photos/foxtongue/3235806474, flickr.com/photos/batterypower/398209685
THE INTERNET OF THINGS (TM)
HTTPHTTP
HTTP
So - What‘s This Rat PAck Thing?
IT‘s Surprisingly
simple, too.
making things happen.
The ORIGINAL RAT PACK
Frank Sinatra,
DEAN Martin &
Sammy Davis (Jr.).
making things happen.
The IOT‘s RAT PACK
The Sinatra GEM,
The ARDUINO System &
The Ruby Language.
making things happen.
The RAT PACK System
THE INTERNET OF THINGS (TM)
The switch
is on!
HTTPHTTP
HTTP
Rat PAck REmote Control. live demo.
making things happen.
Rat Pack Remote Control.
Source: github.com/5v3n/ratpack
WHAT‘S THE VALUE PROPOSITION?
Probably nothing
BUT FUN. during the first three usages.
making things happen.
Talking Of FUN, Part I
Let‘s have a look at
the code.
the (whole) Sinatra Server.
making things happen.
require 'sinatra'
require 'json'
require 'haml'
class RatPackServer < Sinatra::Application
configure do
set :activated, 0
end
get '/' do
haml :index, :locals => {:activated => settings.activated, :indicator_class => indicator(settings.activated)}
end
get '/status.json' do
render_status_response
end
put '/status.json' do
request.body.rewind
data = JSON.parse request.body.read
settings.activated = data['activated']
render_status_response
end
private
def indicator(state)
state == 0 ? :off : :on
end
def render_status_response
"{"activated": #{settings.activated}}"
end
end
the Arduino Client, PT 1.
making things happen.
#include "WiFly.h"
#include "SPI.h"
#include "Config.h"
WiFlyClient client(HOST, 80);
void setup(){
pinMode(buttonPin, INPUT);
Serial.begin(9600);
WiFly.begin();
if (WiFly.join(ssid, passphrase)) {
Serial.println("associted with wifly network.");
}
else {
Serial.println("Association failed.");
while (1) {
}
}
}
void loop(){
if(digitalRead(buttonPin) == LOW){
connectClient(generateHttpPut(HOST, RESOURCE, '0'));
client.stop();
}
else if(digitalRead(buttonPin) == HIGH){
connectClient(generateHttpPut(HOST, RESOURCE, '1'));
client.stop();
}
}
the Arduino Client, PT 2.
making things happen.
char* generateHttpPut(char* host, char* resource, char occupied){
char postString[255];
sprintf(postString, "PUT %s HTTP/1.1rnUser-Agent: %srnHost: %srnContent-Length: 16rnContent-Type:
application/jsonrnrn{"activated": %c}"
, resource, USERAGENT, host, occupied);
return postString;
}
void connectClient(char* http_request){
if (client.connect()) {
client.print(http_request);
client.println();
} else {
Serial.println("connection failed");
}
while(!client.available()){
Serial.print(".");
}
}
Talking Of FUN, Part II
Let‘s have a look at
the Hardware.
the Arduino Hardware.
making things happen.
THE BOTTOM LINE
Connecting
plain old objects
with the internet
is easy.
THE BOTTOM LINE
Using the rat Pack system
makes it actually
dead easy.
THE BOTTOM LINE
So go get it & try
the rat Pack system
yourself.
Talking Of FUN, Most Important
It‘s all on GITHUB - Play with
it, Fork it, Mod it. Enjoy!
github.com/5v3n/ratpack
Modding: Wearable Rat PAck.
making things happen.Photo Source: flickr.com/photos/arduino_cc/8726021014
now let‘s share thoughts!
if you have experience
in these fields:
what do you think?
now let‘s share thoughts!
if you haven‘t any experience
in these fields:
what do you think?
making things happen.
let‘s keep in touch
@sven_kr
@making_de
makingthingshappen.de
sven@makingthingshappen.de
MaterialS: github.com/5v3n/ratpack

Más contenido relacionado

Ähnlich wie Rat Pack Remote Control - a technical Internet of Things (tm) basics primer

Abusing phones to make the internet of things - JSConf EU 2014
Abusing phones to make the internet of things - JSConf EU 2014Abusing phones to make the internet of things - JSConf EU 2014
Abusing phones to make the internet of things - JSConf EU 2014Jan Jongboom
 
AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...
AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...
AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...Amazon Web Services
 
WebRTC Reborn Hackference
WebRTC Reborn HackferenceWebRTC Reborn Hackference
WebRTC Reborn HackferenceDan Jenkins
 
IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with PythonLelio Campanile
 
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with KamaeliaTimeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaeliakamaelian
 
interACT With The Flash Platform
interACT With The Flash PlatforminterACT With The Flash Platform
interACT With The Flash PlatformHappy Banana
 
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingJava Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingTal Melamed
 
WebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC SummitWebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC SummitDan Jenkins
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...André Goliath
 
Advanced view of projects 1502 raspberry pi list raspberry pi projects
Advanced view of projects 1502 raspberry pi list   raspberry pi projectsAdvanced view of projects 1502 raspberry pi list   raspberry pi projects
Advanced view of projects 1502 raspberry pi list raspberry pi projectsWiseNaeem
 
Sense Your Smart City: Connect Environmental Sensors to SensorThings API
Sense Your Smart City: Connect Environmental Sensors to SensorThings APISense Your Smart City: Connect Environmental Sensors to SensorThings API
Sense Your Smart City: Connect Environmental Sensors to SensorThings APISensorUp
 
EkoParty 2010: iPhone Rootkit? There's an App for that.
EkoParty 2010: iPhone Rootkit? There's an App for that.EkoParty 2010: iPhone Rootkit? There's an App for that.
EkoParty 2010: iPhone Rootkit? There's an App for that.Eric Monti
 
a quick Introduction to PyPy
a quick Introduction to PyPya quick Introduction to PyPy
a quick Introduction to PyPyKai Aras
 
Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017
Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017
Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017Codemotion
 
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017Vincent Kok
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...Mark West
 
How to create a basic website with Python on Django
How to create a basic website with Python on DjangoHow to create a basic website with Python on Django
How to create a basic website with Python on DjangoArmağan Ersöz
 
The First Wave of IoT—Blood in the Water
The First Wave of IoT—Blood in the WaterThe First Wave of IoT—Blood in the Water
The First Wave of IoT—Blood in the WaterJosiah Renaudin
 

Ähnlich wie Rat Pack Remote Control - a technical Internet of Things (tm) basics primer (20)

Abusing phones to make the internet of things - JSConf EU 2014
Abusing phones to make the internet of things - JSConf EU 2014Abusing phones to make the internet of things - JSConf EU 2014
Abusing phones to make the internet of things - JSConf EU 2014
 
AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...
AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...
AWS re:Invent 2016: Robots: The Fading Line Between Real and Virtual Worlds (...
 
WebRTC Reborn Hackference
WebRTC Reborn HackferenceWebRTC Reborn Hackference
WebRTC Reborn Hackference
 
IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with Python
 
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with KamaeliaTimeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
Timeshift Everything, Miss Nothing - Mashup your PVR with Kamaelia
 
interACT With The Flash Platform
interACT With The Flash PlatforminterACT With The Flash Platform
interACT With The Flash Platform
 
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingJava Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
 
WebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC SummitWebRTC Reborn - Cloud Expo / WebRTC Summit
WebRTC Reborn - Cloud Expo / WebRTC Summit
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
 
Advanced view of projects 1502 raspberry pi list raspberry pi projects
Advanced view of projects 1502 raspberry pi list   raspberry pi projectsAdvanced view of projects 1502 raspberry pi list   raspberry pi projects
Advanced view of projects 1502 raspberry pi list raspberry pi projects
 
Source Control 101
Source Control 101Source Control 101
Source Control 101
 
Sense Your Smart City: Connect Environmental Sensors to SensorThings API
Sense Your Smart City: Connect Environmental Sensors to SensorThings APISense Your Smart City: Connect Environmental Sensors to SensorThings API
Sense Your Smart City: Connect Environmental Sensors to SensorThings API
 
EkoParty 2010: iPhone Rootkit? There's an App for that.
EkoParty 2010: iPhone Rootkit? There's an App for that.EkoParty 2010: iPhone Rootkit? There's an App for that.
EkoParty 2010: iPhone Rootkit? There's an App for that.
 
a quick Introduction to PyPy
a quick Introduction to PyPya quick Introduction to PyPy
a quick Introduction to PyPy
 
Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017
Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017
Vincent Kok - Microservices 5 things I wish I'd known - Codemotion Milan 2017
 
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
 
Survey_Paper
Survey_PaperSurvey_Paper
Survey_Paper
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
 
How to create a basic website with Python on Django
How to create a basic website with Python on DjangoHow to create a basic website with Python on Django
How to create a basic website with Python on Django
 
The First Wave of IoT—Blood in the Water
The First Wave of IoT—Blood in the WaterThe First Wave of IoT—Blood in the Water
The First Wave of IoT—Blood in the Water
 

Último

LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0DanBrown980551
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024Brian Pichman
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)IES VE
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarThousandEyes
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxNeo4j
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updateadam112203
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2DianaGray10
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kitJamie (Taka) Wang
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 

Último (20)

LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
 
SheDev 2024
SheDev 2024SheDev 2024
SheDev 2024
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kit
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 

Rat Pack Remote Control - a technical Internet of Things (tm) basics primer

  • 1. Rat Pack Remote Control a technical Internet of Things (tm) basics primer Sven Kräuter - @SVEN_KR Codemotion Berlin | 05/2013
  • 2. making things happen. who is sven kräuter? sven Kräuter is an agile & lean coach, software developer and a maker.
  • 3. what is THE INTERNET OF THINGS? THE INTERNET OF THINGS IS...
  • 4. making things happen. the internet of things (Iot) objects communicating via the internet build the iot.
  • 5. making things happen. the Iot good bye „one size fits all“.
  • 6. making things happen. the Iot hello „dedicated devices“.
  • 8. video Source: sven‘s smartphone M&C BULLI. making things happen.
  • 9. making things happen. Category A Iot interaction with existing online services.
  • 10. making things happen. Category A Iot representation of known information in a new way.
  • 11. video Source: http://vimeo.com/45980092 GOOD NIGHT LAMP. making things happen.
  • 12. making things happen. Category B Iot establishing new online services.
  • 13. making things happen. Category B Iot representation of new information in a new way.
  • 14. nice but what‘s the purpose? let me elaborate...
  • 15. making things happen. trend Always On increasing amount of real time data & screens do not scale.
  • 16. making things happen. screens do not scale representation of data on a screen is just one possibility.
  • 17. making things happen. screens do not scale it is not necessarily the best possibility.
  • 18. video Source: https://vimeo.com/49425556 NO PLACE LIKE HOME. making things happen.
  • 19. what THE INTERNET OF THINGS is THE INTERNET OF THINGS IS enabling you to communicate beyond the boundaries of screens and keyboards.
  • 20. what THE INTERNET OF THINGS is it IS enabling you to communicate online in a more intuitive & more effective way.
  • 21. Nice. But HOW DOES IT WORK? Surprisingly simple...
  • 22. making things happen. The Internet THE INTERNET (TM) Hello there! Send Hello there! HTTPHTTP HTTP
  • 23. making things happen. The Internet OF Things Category A THE INTERNET OF THINGS (TM) I want to go to.... Send HTTPHTTP HTTP Photo Source: flickr.com/photos/bike/5153033439/in/photostream/
  • 24. making things happen. The Internet OF Things Category B Photo Sources: flickr.com/photos/foxtongue/3235806474, flickr.com/photos/batterypower/398209685 THE INTERNET OF THINGS (TM) HTTPHTTP HTTP
  • 25. So - What‘s This Rat PAck Thing? IT‘s Surprisingly simple, too.
  • 26. making things happen. The ORIGINAL RAT PACK Frank Sinatra, DEAN Martin & Sammy Davis (Jr.).
  • 27. making things happen. The IOT‘s RAT PACK The Sinatra GEM, The ARDUINO System & The Ruby Language.
  • 28. making things happen. The RAT PACK System THE INTERNET OF THINGS (TM) The switch is on! HTTPHTTP HTTP
  • 29. Rat PAck REmote Control. live demo. making things happen.
  • 30. Rat Pack Remote Control. Source: github.com/5v3n/ratpack WHAT‘S THE VALUE PROPOSITION? Probably nothing BUT FUN. during the first three usages. making things happen.
  • 31. Talking Of FUN, Part I Let‘s have a look at the code.
  • 32. the (whole) Sinatra Server. making things happen. require 'sinatra' require 'json' require 'haml' class RatPackServer < Sinatra::Application configure do set :activated, 0 end get '/' do haml :index, :locals => {:activated => settings.activated, :indicator_class => indicator(settings.activated)} end get '/status.json' do render_status_response end put '/status.json' do request.body.rewind data = JSON.parse request.body.read settings.activated = data['activated'] render_status_response end private def indicator(state) state == 0 ? :off : :on end def render_status_response "{"activated": #{settings.activated}}" end end
  • 33. the Arduino Client, PT 1. making things happen. #include "WiFly.h" #include "SPI.h" #include "Config.h" WiFlyClient client(HOST, 80); void setup(){ pinMode(buttonPin, INPUT); Serial.begin(9600); WiFly.begin(); if (WiFly.join(ssid, passphrase)) { Serial.println("associted with wifly network."); } else { Serial.println("Association failed."); while (1) { } } } void loop(){ if(digitalRead(buttonPin) == LOW){ connectClient(generateHttpPut(HOST, RESOURCE, '0')); client.stop(); } else if(digitalRead(buttonPin) == HIGH){ connectClient(generateHttpPut(HOST, RESOURCE, '1')); client.stop(); } }
  • 34. the Arduino Client, PT 2. making things happen. char* generateHttpPut(char* host, char* resource, char occupied){ char postString[255]; sprintf(postString, "PUT %s HTTP/1.1rnUser-Agent: %srnHost: %srnContent-Length: 16rnContent-Type: application/jsonrnrn{"activated": %c}" , resource, USERAGENT, host, occupied); return postString; } void connectClient(char* http_request){ if (client.connect()) { client.print(http_request); client.println(); } else { Serial.println("connection failed"); } while(!client.available()){ Serial.print("."); } }
  • 35. Talking Of FUN, Part II Let‘s have a look at the Hardware.
  • 37. THE BOTTOM LINE Connecting plain old objects with the internet is easy.
  • 38. THE BOTTOM LINE Using the rat Pack system makes it actually dead easy.
  • 39. THE BOTTOM LINE So go get it & try the rat Pack system yourself.
  • 40. Talking Of FUN, Most Important It‘s all on GITHUB - Play with it, Fork it, Mod it. Enjoy! github.com/5v3n/ratpack
  • 41. Modding: Wearable Rat PAck. making things happen.Photo Source: flickr.com/photos/arduino_cc/8726021014
  • 42. now let‘s share thoughts! if you have experience in these fields: what do you think?
  • 43. now let‘s share thoughts! if you haven‘t any experience in these fields: what do you think?
  • 44. making things happen. let‘s keep in touch @sven_kr @making_de makingthingshappen.de sven@makingthingshappen.de MaterialS: github.com/5v3n/ratpack