SlideShare a Scribd company logo
A Practical Guide to
Connecting Hardware to
the Web
Justin Mclean
www.classsoftware.com
Who am I?
• Director of Class Software for 15 years
• Developing and creating web applications for
  15 years
• Programming for 25 years
• Adobe solution partner
• Adobe certified developer and trainer in Flex
  and ColdFusion
• Based in Sydney Australia
Electronics Trends
• Low cost
• Small components
• Complex components with simple interfaces
Computing Trends
•   Easier to program
•   Use of high level languages
•   Software tools
•   Open source
Are We There Yet?
• Low cost fast devices
• It’s easy to communicate between devices and
  computers
• Can build complex systems from off the shelf
  components
Arduino
Overview of the Arduino Platform
Arduino Platform
• Open source hardware and software platform
• Easy to program
• Hardware is flexible, fast, low power and low
  cost
Arduino Hardware
• Comes in a number of shapes sizes
• Low cost
• Easy to extend
Arduino Boards
Arduino Shields
Arduino Software Platform
•   Open source cross platform IDE
•   Alpha but very stable
•   Code in high level C like language
•   Updated frequently
•   Growing and active community
Arduino Code
• C like high level language
• Inbuilt functions to read and set digital and
  analog inputs and outputs
• Includes libraries to perform common
  hardware or software tasks
Arduino IDE
Led Shield Demo
Issues
•   Debugging can be hard
•   No simulator
•   Memory, power and speed limits
•   Helps to have a little electronic knowledge
Connecting
Arduinos
How Arduinos communicate with the
outside world
Connection Methods
•   Direct to computer
•   Wireless (XBee modems)
•   Ethernet or WiFi
•   The Cloud
Supported Languages
•   Flex and Flash
•   Processing
•   Python
•   Ruby
•   Java
•   C, C++, C# and Objective C
•   .NET
Direct Connection
How to communicate with Arduinos
and via PCs
Direct Communication
• Most languages can’t talk USB
• Solution: Socket to USB proxy
Layers of Communication
• Library to communicate with proxy
• Proxy to USB communication
• USB to arduino
Computer                       Arduino




  Application Code                                  Arduino




Function Calls and
                                                     Code
      Events


                      TCP/IP                USB
      Library                   USB Proxy           Firmata
                      Socket                Cable




  Connection Diagram
Firmata Protocal
•   Simple binary protocol
•   Based on MIDI
•   Easy to extend
•   Standard Arduino software library
Arduino Demo
Issues
• Works best with a persistent connection
• If not persistent startup time and auto reset
  issues
• Solution: custom bootloader
• Needs a computer
• Proxy must be running on machine Arduino is
  connected to
Xbee Modems
Using Arduinos with XBee modems
XBee Modems
•   Hardware wireless modem
•   Low cost
•   Consume very little power
•   Good range
•   Easy to configure
XBee Modems
XBee Demo
Ethernet
Using Arduino Ethernet Shields
Ethernet Shields
•   Allow direct internet connection
•   No dedicated computer needed
•   Shields need a little config
•   Can act as web server or client
Ethernet Shields
Ethernet Arduino Code
• Web server code
• Easy to modify
Ethernet Demo
Pachube
An easier way to connect Arduinos
Pachube
•   Store and share and acess realtime sensor data
•   Simple and secure
•   API to interact with all data and services
•   Graphs and maps
Pachube
Pachube API
•   Communicates HTTP
•   Plain text (csv), XML or Jason
•   REST based
•   Large base of supported languages
Pachube Arduino Code
• Runs on Arduino with ethernet shield
• Sends values to Pachube
• Request values via Pachube
Pachube Interaction
•   Call Pachube API using HTTP call
•   Parse XML
•   XML is in EEML format
•   Display or act on values
Pachube Demo
Pachube Triggers
• Pachube can call an URL on value change
• The URL can be a dynamic
Why do this?
• Expose yourself to new ideas and new ways of
  solving problems
• Involves interaction with the real world
• Encourages creativity
• Makes you a better programmer
It’s Fun!
Questions?
• Ask now, see me after session or email
  justin@classsoftware.com
Useful Sites
List of useful hardware and software
sites
Software Sites
• Arduino http://www.arduino.cc for software,
  user forum and playground
• Ethernet Shields http://arduino.cc/en/
  Reference/Ethernet
• Pachhub http://www.pachube.com/
Hardware Sites
• Spark Fun (US) http://www.sparkfun.com/
• Adafruit Industries (US) http://
  www.adafruit.com/
• Electronic Goldmine (US) http://
  www.goldmine-elec.com/
Other Sites
• Lady Ada http://www.ladyada.net/
• Evil Mad Scientist http://
  www.evilmadscientist.com/
• NY Resistor http://www.nycresistor.com/
• Make Zine http://makezine.com/

More Related Content

PDF
Elements of Connected Products
PDF
Inter-process audio options on iOS
PPTX
Website design & developemet
PPTX
Functional Programming in PHP
PDF
Elixir Programming Language 101
PDF
IPv6 at Home -2014
PDF
[WSO2Con EU 2017] How to Learn and Contribute to Ballerina
PPTX
Productivity tablet apps for PAs (PA life Nov 2014)
Elements of Connected Products
Inter-process audio options on iOS
Website design & developemet
Functional Programming in PHP
Elixir Programming Language 101
IPv6 at Home -2014
[WSO2Con EU 2017] How to Learn and Contribute to Ballerina
Productivity tablet apps for PAs (PA life Nov 2014)

Viewers also liked (6)

PDF
ColdFusion Security and Risk Management
PDF
Connecting RIAs and hardware together
PDF
Putting your device in a browser or on the web
PDF
Connecting open source hardware to the web
PDF
Connecting hardware to ColdFusion
PDF
A Practical Guide to Connecting Hardware to Flex
ColdFusion Security and Risk Management
Connecting RIAs and hardware together
Putting your device in a browser or on the web
Connecting open source hardware to the web
Connecting hardware to ColdFusion
A Practical Guide to Connecting Hardware to Flex
Ad

Similar to Edge Of The Web (20)

PDF
A Practical Guide to Connecting Hardware to the Web
PDF
Connecting Hardware to Flex (360MAX)
PDF
Connecting hardware up to ColdFusion
PDF
Arduino Teaching Program
PPT
IoT with Arduino
DOCX
Interoperability in Internet of Things (IOT)
PPTX
What is Arduino
PPTX
Controlling an Arduino with Android
PDF
programmer avec Arduino
PDF
manual Internet of ThingsArduino_IOTArdu
PDF
A practical guide to connecting hardware to Flex
PDF
Arduino Development For Beginners
PPTX
Using arduino and raspberry pi for internet of things
PDF
What is arduino
PDF
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
PPTX
Arduino
PPTX
Arduino and c programming
PDF
Oop 2014 embedded systems with open source hardware v2
PDF
Introducing... Arduino
A Practical Guide to Connecting Hardware to the Web
Connecting Hardware to Flex (360MAX)
Connecting hardware up to ColdFusion
Arduino Teaching Program
IoT with Arduino
Interoperability in Internet of Things (IOT)
What is Arduino
Controlling an Arduino with Android
programmer avec Arduino
manual Internet of ThingsArduino_IOTArdu
A practical guide to connecting hardware to Flex
Arduino Development For Beginners
Using arduino and raspberry pi for internet of things
What is arduino
Arduino Lecture 2 - Interactive Media CS4062 Semester 2 2009
Arduino
Arduino and c programming
Oop 2014 embedded systems with open source hardware v2
Introducing... Arduino
Ad

Recently uploaded (20)

PDF
project resource management chapter-09.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
A Presentation on Touch Screen Technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
A Presentation on Artificial Intelligence
PDF
1 - Historical Antecedents, Social Consideration.pdf
project resource management chapter-09.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Encapsulation theory and applications.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
OMC Textile Division Presentation 2021.pptx
A Presentation on Touch Screen Technology
Assigned Numbers - 2025 - Bluetooth® Document
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Hindi spoken digit analysis for native and non-native speakers
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A comparative analysis of optical character recognition models for extracting...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A comparative study of natural language inference in Swahili using monolingua...
Heart disease approach using modified random forest and particle swarm optimi...
Programs and apps: productivity, graphics, security and other tools
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A Presentation on Artificial Intelligence
1 - Historical Antecedents, Social Consideration.pdf

Edge Of The Web