SlideShare a Scribd company logo
Scripting Things Pittsburgh Perl Workshop 2011 Carnegie Mellon University Hans Scharler www.ioBridge.com @scharler
Objectives Introduce the “Internet of Things” Learn how to Innovate Answer: Why Perl? Interface the Real-world Learn how to start a project Plant some ideas Answer Questions
The Internet of Things Sensors Controllers People Buildings Connectivity Applications Source: The Things People Things
The Internet of Things Is server monitoring too boring for the Internet of Things?  NO…  Write a simple script to monitor CPU and RAM utilization and push that data out to a web service to measure server uptime and performance IoT is only going to work in small steps. It starts with remote server monitoring and ends with SkyNet.
Innovation Source: everythingisaremix.info
Innovation Example Temperature Sensing Temperature Sensing Humidity Sensing Humidity Sensing + Twitter Tweeting Humidor
The Solution Perl?
The Benefits of Perl Parsing String Operations REGEX Native Serial Hardware Abstraction Connecting APIs CPAN
The Opportunity “ Imagine if we attach Perl to the emerging Internet of Things” --Hans Scharler “ Industry Leading Expert” Source: Hans Scharler
Perl’s Keys to Success Examples written in Perl CPAN module for Arduino® / ioBridge® Projects that use Perl to connect things
Interface to the Real World Digital I/O Analog Serial (via)  Network Protocols
Digital I/O Digital   = Discrete States (On/Off) I   = Input O   = Output Use Digital I/O to check if something is On / Off (input) or to turn something On / Off (output)
Digital Output Device generates some voltage to represent the “On” state – typically 5v Device generates some voltage to represent the “Off” state – typically 0v
Digital Output If something that you are hacking has a button or switch, you can just replace it with a Digital Output / Relay to operate that device (most of the time) “ 1100110001101” (bark)
Digital Input Read in voltage that represents the “On” state – typically 5v Read in voltage that represents the “Off” state – typically 0v
Digital Input Use Digital Inputs to see if something is opened / closed, up / down, or on / off Down Open On
Analog Input Varying voltages – typically from 0 to 5v Higher voltages indicate more of something Lower voltages indicate less of something Used for sensors Source: physicscentral.com
Analog Input: Temperature Source: physicscentral.com Voltage Time ->
Analog Input for Sensors Examples of Analog Input: Temperature Humidity Pressure Light Levels Distance  / Range Volume Source: physicscentral.com
Serial Serial is a way of passing data one piece at a time between devices A little more complicated, but Serial has universal concepts: Databits  –  typically 8 Baud Rate / Speed  –  typically 9,600 or 19,200 Parity  –  typically “none” Stop Bits  –  typically 1
Serial Even more Serial Concepts… RS-232 Short distance communication Higher voltages – old serial ports on computers and modems UART Short distance commutations 0 to 5v Used with microcontrollers such as Arduino® RS-485 Long distance serial Used more by industrial control systems
Serial-over-USB Converts USB to UART Serial
Device::SerialPort ls -la /dev/tty* use Device::SerialPort; my $port = Device::SerialPort->new("/dev/tty.usbserial"); $port->baudrate(19200); $port->databits(8); $port->parity("none"); $port->stopbits(1); Find your serial device: Perl Setup: Settings must match on both sides
Device::SerialPort my $char = $port->lookfor(); print “$char \n”; $port->write(“Hello World"); Read Serial Data: Send Serial Data: See Also: Win32::SerialPort Firmata for Arduino: http://firmata.org/wiki/Download https://github.com/amimoto/perl-firmata
Network Protocols Abstraction of physical interface over network protocols Serial-over-Ethernet HTTP GET  to get data from a Digital or Analog Input HTTP POST / PUT  to control a Digital Output API to Device - “ioBridge”
Serial over Network Serial Serial Ethernet Ethernet Now you can go a long distance over UART serial
“ ioBridge” ioBridge IO-204 Ethernet Module Relay Thermostat Temperature Sensor HTTP POST “ turn on thermostat” HTTP GET “ temperature”
How to Start Start small Duplicate someone else's well documented project  (check Instructables.com or Google) Break every project down to a list of basic concepts  (Digital I/O, Analog, Serial, Network Protocols) Transform the basic design  (make a change) Combine the design with other ideas  (add Twitter) Finish big
What We Do Projects!
Internet Pet Feeders 2008  2009  2010
Projects turned Products
Platform Technologies Optimized TCP/IP Stack Portable Client Real-time Streaming, Web Sockets, Comet Application Design Platform API Abstraction Visualizations
Projects turned Products
Control Heating/Cooling Based on Current Position and Weather Track Your Location With Google Latitude
iPhone Controlled Beer Cannon Mini Fridge Beer Cannon by Ryan Rusnak Over 1 million YouTube Views Demo’d Live on TV In the June 2011 issue of Popular Science Featured on JUNKies -- TV Show on Discovery Science
Learn more… My blog -  http://iamshadowlord.com “ Thermd” Perl Module -  http://www.klein.com/thermd Arduino -  http://www.arduino.cc ioBridge –  http://www.iobridge.com Instructables –  http://www.instructables.com
Q&A Hans Scharler [email_address] www.ioBridge.com

More Related Content

PPTX
ThingSpeak: apps for social things
PPT
ioBridge Web of Things Platform, Projects, and Products
PDF
Driving the Internet of Things with Mobile Apps at tiConf
KEY
Blackstock wo t 2011
PPTX
Performance trends and alerts with ThingSpeak IoT
PDF
IoT and Big data with R
PDF
Using R for the internet of things
PPTX
Home automation using iot
ThingSpeak: apps for social things
ioBridge Web of Things Platform, Projects, and Products
Driving the Internet of Things with Mobile Apps at tiConf
Blackstock wo t 2011
Performance trends and alerts with ThingSpeak IoT
IoT and Big data with R
Using R for the internet of things
Home automation using iot

What's hot (20)

PDF
Understanding IoT with Cloud IoT Core
PDF
The Internet of Things & hue
PDF
IoT and Its Application
PDF
Living in a connected world_Devoxx2015_Duchess France
PDF
On a connecté le studio !
PDF
DIY Technology for the Internet of Things
PPTX
Automating with the Internet of Things
PDF
Internet of things - Frantic
PPTX
Razorfish 2014 Tech Summit - Kick-off by Global CTO Ray Velez
PDF
How to use IoT data with Watson SpeechToText, TextToSpeech and NLC to query ...
PDF
Razorfish 2014 Tech Summit - Founder/CEO of Bug Labs Peter Semmelhack
PPTX
Smart home control system
PPTX
Hackacle Hardware for the Internet of Things (IoT)
PDF
Pachube: an open, easy to use, secure & scalable platform for building the 'I...
PPTX
Command your home from the wrist
PDF
IOT and Home Automation with Serverless Computing | Serverless Days 2019 | So...
PDF
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
PDF
Internet of Things with Python & Serverless - PyCon MY 2019 - Kuala Lumpur, M...
PPTX
IOT Based Home Automation using Raspberry Pi-3
PDF
Introducing Pachube: An open, easy-to-use, secure & scalable platform for bu...
Understanding IoT with Cloud IoT Core
The Internet of Things & hue
IoT and Its Application
Living in a connected world_Devoxx2015_Duchess France
On a connecté le studio !
DIY Technology for the Internet of Things
Automating with the Internet of Things
Internet of things - Frantic
Razorfish 2014 Tech Summit - Kick-off by Global CTO Ray Velez
How to use IoT data with Watson SpeechToText, TextToSpeech and NLC to query ...
Razorfish 2014 Tech Summit - Founder/CEO of Bug Labs Peter Semmelhack
Smart home control system
Hackacle Hardware for the Internet of Things (IoT)
Pachube: an open, easy to use, secure & scalable platform for building the 'I...
Command your home from the wrist
IOT and Home Automation with Serverless Computing | Serverless Days 2019 | So...
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
Internet of Things with Python & Serverless - PyCon MY 2019 - Kuala Lumpur, M...
IOT Based Home Automation using Raspberry Pi-3
Introducing Pachube: An open, easy-to-use, secure & scalable platform for bu...
Ad

Similar to Scripting Things - Creating the Internet of Things with Perl (20)

PDF
Device Operation using PC by Arduino (1).pdf
PDF
Hardware hacking
PPTX
IOT beginnners
PPTX
IOT beginnners
PPTX
M.Tech Internet of Things Unit - III.pptx
PDF
Arduino spooky projects_class3
PPTX
Null mumbai-iot-workshop
PPTX
Introduction-to-Arduino-for-IoT Research
PDF
Iot for smart agriculture
PPTX
ARDUINO Presentation1.pptx
PPT
IoT with Arduino
PDF
Arduino Teaching Program
PPT
Arduino and Internet of Thinks: ShareIT TM: march 2010, TM
PDF
Arduino Cookbook.pdf
PDF
IoT Physical Devices and End Points.pdf
PDF
Syed IoT - module 5
PDF
Taking the hard out of hardware
PDF
Smart Home Automation using Wi-Fi
PDF
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
PPT
IoT Basics with few Embedded System Connections for sensors
Device Operation using PC by Arduino (1).pdf
Hardware hacking
IOT beginnners
IOT beginnners
M.Tech Internet of Things Unit - III.pptx
Arduino spooky projects_class3
Null mumbai-iot-workshop
Introduction-to-Arduino-for-IoT Research
Iot for smart agriculture
ARDUINO Presentation1.pptx
IoT with Arduino
Arduino Teaching Program
Arduino and Internet of Thinks: ShareIT TM: march 2010, TM
Arduino Cookbook.pdf
IoT Physical Devices and End Points.pdf
Syed IoT - module 5
Taking the hard out of hardware
Smart Home Automation using Wi-Fi
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
IoT Basics with few Embedded System Connections for sensors
Ad

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
KodekX | Application Modernization Development
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
KodekX | Application Modernization Development
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Scripting Things - Creating the Internet of Things with Perl

  • 1. Scripting Things Pittsburgh Perl Workshop 2011 Carnegie Mellon University Hans Scharler www.ioBridge.com @scharler
  • 2. Objectives Introduce the “Internet of Things” Learn how to Innovate Answer: Why Perl? Interface the Real-world Learn how to start a project Plant some ideas Answer Questions
  • 3. The Internet of Things Sensors Controllers People Buildings Connectivity Applications Source: The Things People Things
  • 4. The Internet of Things Is server monitoring too boring for the Internet of Things? NO… Write a simple script to monitor CPU and RAM utilization and push that data out to a web service to measure server uptime and performance IoT is only going to work in small steps. It starts with remote server monitoring and ends with SkyNet.
  • 6. Innovation Example Temperature Sensing Temperature Sensing Humidity Sensing Humidity Sensing + Twitter Tweeting Humidor
  • 8. The Benefits of Perl Parsing String Operations REGEX Native Serial Hardware Abstraction Connecting APIs CPAN
  • 9. The Opportunity “ Imagine if we attach Perl to the emerging Internet of Things” --Hans Scharler “ Industry Leading Expert” Source: Hans Scharler
  • 10. Perl’s Keys to Success Examples written in Perl CPAN module for Arduino® / ioBridge® Projects that use Perl to connect things
  • 11. Interface to the Real World Digital I/O Analog Serial (via) Network Protocols
  • 12. Digital I/O Digital = Discrete States (On/Off) I = Input O = Output Use Digital I/O to check if something is On / Off (input) or to turn something On / Off (output)
  • 13. Digital Output Device generates some voltage to represent the “On” state – typically 5v Device generates some voltage to represent the “Off” state – typically 0v
  • 14. Digital Output If something that you are hacking has a button or switch, you can just replace it with a Digital Output / Relay to operate that device (most of the time) “ 1100110001101” (bark)
  • 15. Digital Input Read in voltage that represents the “On” state – typically 5v Read in voltage that represents the “Off” state – typically 0v
  • 16. Digital Input Use Digital Inputs to see if something is opened / closed, up / down, or on / off Down Open On
  • 17. Analog Input Varying voltages – typically from 0 to 5v Higher voltages indicate more of something Lower voltages indicate less of something Used for sensors Source: physicscentral.com
  • 18. Analog Input: Temperature Source: physicscentral.com Voltage Time ->
  • 19. Analog Input for Sensors Examples of Analog Input: Temperature Humidity Pressure Light Levels Distance / Range Volume Source: physicscentral.com
  • 20. Serial Serial is a way of passing data one piece at a time between devices A little more complicated, but Serial has universal concepts: Databits – typically 8 Baud Rate / Speed – typically 9,600 or 19,200 Parity – typically “none” Stop Bits – typically 1
  • 21. Serial Even more Serial Concepts… RS-232 Short distance communication Higher voltages – old serial ports on computers and modems UART Short distance commutations 0 to 5v Used with microcontrollers such as Arduino® RS-485 Long distance serial Used more by industrial control systems
  • 23. Device::SerialPort ls -la /dev/tty* use Device::SerialPort; my $port = Device::SerialPort->new("/dev/tty.usbserial"); $port->baudrate(19200); $port->databits(8); $port->parity("none"); $port->stopbits(1); Find your serial device: Perl Setup: Settings must match on both sides
  • 24. Device::SerialPort my $char = $port->lookfor(); print “$char \n”; $port->write(“Hello World"); Read Serial Data: Send Serial Data: See Also: Win32::SerialPort Firmata for Arduino: http://firmata.org/wiki/Download https://github.com/amimoto/perl-firmata
  • 25. Network Protocols Abstraction of physical interface over network protocols Serial-over-Ethernet HTTP GET to get data from a Digital or Analog Input HTTP POST / PUT to control a Digital Output API to Device - “ioBridge”
  • 26. Serial over Network Serial Serial Ethernet Ethernet Now you can go a long distance over UART serial
  • 27. “ ioBridge” ioBridge IO-204 Ethernet Module Relay Thermostat Temperature Sensor HTTP POST “ turn on thermostat” HTTP GET “ temperature”
  • 28. How to Start Start small Duplicate someone else's well documented project (check Instructables.com or Google) Break every project down to a list of basic concepts (Digital I/O, Analog, Serial, Network Protocols) Transform the basic design (make a change) Combine the design with other ideas (add Twitter) Finish big
  • 29. What We Do Projects!
  • 30. Internet Pet Feeders 2008 2009 2010
  • 32. Platform Technologies Optimized TCP/IP Stack Portable Client Real-time Streaming, Web Sockets, Comet Application Design Platform API Abstraction Visualizations
  • 34. Control Heating/Cooling Based on Current Position and Weather Track Your Location With Google Latitude
  • 35. iPhone Controlled Beer Cannon Mini Fridge Beer Cannon by Ryan Rusnak Over 1 million YouTube Views Demo’d Live on TV In the June 2011 issue of Popular Science Featured on JUNKies -- TV Show on Discovery Science
  • 36. Learn more… My blog - http://iamshadowlord.com “ Thermd” Perl Module - http://www.klein.com/thermd Arduino - http://www.arduino.cc ioBridge – http://www.iobridge.com Instructables – http://www.instructables.com
  • 37. Q&A Hans Scharler [email_address] www.ioBridge.com