SlideShare a Scribd company logo
1 of 44
Download to read offline
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

More Related Content

Similar to 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
 

Similar to 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
 

Recently uploaded

ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 

Recently uploaded (20)

ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 

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