0
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
• Programmin...
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 s...
Arduino
Overview of the Arduino Platform
Arduino Platform
• Open source hardware and software platform
• Easy to program
• Hardware is flexible, fast, low power an...
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 langu...
Arduino Code
• C like high level language
• Inbuilt functions to read and set digital and
  analog inputs and outputs
• In...
Arduino IDE
Led Shield Demo
Issues
•   Debugging can be hard
•   No simulator
•   Memory, power and speed limits
•   Helps to have a little electronic...
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 ...
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: cust...
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
• ...
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 ser...
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 val...
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
...
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...
Hardware Sites
• Spark Fun (US) http://www.sparkfun.com/
• Adafruit Industries (US) http://
  www.adafruit.com/
• Electron...
Other Sites
• Lady Ada http://www.ladyada.net/
• Evil Mad Scientist http://
  www.evilmadscientist.com/
• NY Resistor http...
Upcoming SlideShare
Loading in...5
×

Edge Of The Web

1,984

Published on

Looks at the revolution in low cost easy to program embedded computing. We’ll look at how this has come about and how easy it now is to be able to interface with hardware from within a web browser with a focus on the Arduino platform.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,984
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
48
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "Edge Of The Web"

  1. 1. A Practical Guide to Connecting Hardware to the Web Justin Mclean www.classsoftware.com
  2. 2. 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
  3. 3. Electronics Trends • Low cost • Small components • Complex components with simple interfaces
  4. 4. Computing Trends • Easier to program • Use of high level languages • Software tools • Open source
  5. 5. 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
  6. 6. Arduino Overview of the Arduino Platform
  7. 7. Arduino Platform • Open source hardware and software platform • Easy to program • Hardware is flexible, fast, low power and low cost
  8. 8. Arduino Hardware • Comes in a number of shapes sizes • Low cost • Easy to extend
  9. 9. Arduino Boards
  10. 10. Arduino Shields
  11. 11. 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
  12. 12. 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
  13. 13. Arduino IDE
  14. 14. Led Shield Demo
  15. 15. Issues • Debugging can be hard • No simulator • Memory, power and speed limits • Helps to have a little electronic knowledge
  16. 16. Connecting Arduinos How Arduinos communicate with the outside world
  17. 17. Connection Methods • Direct to computer • Wireless (XBee modems) • Ethernet or WiFi • The Cloud
  18. 18. Supported Languages • Flex and Flash • Processing • Python • Ruby • Java • C, C++, C# and Objective C • .NET
  19. 19. Direct Connection How to communicate with Arduinos and via PCs
  20. 20. Direct Communication • Most languages can’t talk USB • Solution: Socket to USB proxy
  21. 21. Layers of Communication • Library to communicate with proxy • Proxy to USB communication • USB to arduino
  22. 22. Computer Arduino Application Code Arduino Function Calls and Code Events TCP/IP USB Library USB Proxy Firmata Socket Cable Connection Diagram
  23. 23. Firmata Protocal • Simple binary protocol • Based on MIDI • Easy to extend • Standard Arduino software library
  24. 24. Arduino Demo
  25. 25. 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
  26. 26. Xbee Modems Using Arduinos with XBee modems
  27. 27. XBee Modems • Hardware wireless modem • Low cost • Consume very little power • Good range • Easy to configure
  28. 28. XBee Modems
  29. 29. XBee Demo
  30. 30. Ethernet Using Arduino Ethernet Shields
  31. 31. Ethernet Shields • Allow direct internet connection • No dedicated computer needed • Shields need a little config • Can act as web server or client
  32. 32. Ethernet Shields
  33. 33. Ethernet Arduino Code • Web server code • Easy to modify
  34. 34. Ethernet Demo
  35. 35. Pachube An easier way to connect Arduinos
  36. 36. Pachube • Store and share and acess realtime sensor data • Simple and secure • API to interact with all data and services • Graphs and maps
  37. 37. Pachube
  38. 38. Pachube API • Communicates HTTP • Plain text (csv), XML or Jason • REST based • Large base of supported languages
  39. 39. Pachube Arduino Code • Runs on Arduino with ethernet shield • Sends values to Pachube • Request values via Pachube
  40. 40. Pachube Interaction • Call Pachube API using HTTP call • Parse XML • XML is in EEML format • Display or act on values
  41. 41. Pachube Demo
  42. 42. Pachube Triggers • Pachube can call an URL on value change • The URL can be a dynamic
  43. 43. 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
  44. 44. It’s Fun!
  45. 45. Questions? • Ask now, see me after session or email justin@classsoftware.com
  46. 46. Useful Sites List of useful hardware and software sites
  47. 47. 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/
  48. 48. Hardware Sites • Spark Fun (US) http://www.sparkfun.com/ • Adafruit Industries (US) http:// www.adafruit.com/ • Electronic Goldmine (US) http:// www.goldmine-elec.com/
  49. 49. 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/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×