SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
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

Contenu connexe

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

a quick Introduction to PyPy
a quick Introduction to PyPya quick Introduction to PyPy
a quick Introduction to PyPy
Kai Aras
 
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
Armağan Ersöz
 

Similaire à 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
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

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