Connecting Open Source
                           Hardware to the Web

                           Justin Mclean

         ...
Who am I?
                    • Programming for 25 years
                    • Developing and creating web applications fo...
Arduino
                           Overview of the Arduino Platform




Sunday, 28 February 2010
Arduino Platform
                    • Open source hardware and software platform
                    • Easy to program
  ...
Arduino Hardware
                    • Comes in a number of shapes sizes
                    • Low cost
                  ...
Arduino Boards

Sunday, 28 February 2010
Arduino Shields

Sunday, 28 February 2010
Arduino Software Platform
                    •      Open source cross platform IDE
                    •      Alpha but v...
Arduino Code
                    • C like high level language
                    • Inbuilt functions to read and set digi...
Arduino IDE

Sunday, 28 February 2010
Led Shield Demo

Sunday, 28 February 2010
Issues
                    • Debugging can be hard
                    • Memory, power and speed limits
                  ...
Connecting
                           Arduinos to the Web
                           How Arduinos can communicate with
   ...
Connection Methods
                    •      Direct to computer
                    •      Wireless (XBee modems)
       ...
Supported Languages
                    •      Flash and Flex
                    •      Processing
                    • ...
Direct Connection
                           How to communicate with Arduinos
                           via a computer


...
Direct Communication
                    • Most languages can’t talk USB
                    • Solution: Socket to USB pro...
Layers of Communication
                    • Code Library
                    • Proxy to USB
                    • Progra...
Firmata Protocal
                    •      Standard Arduino library
                    •      Simple binary protocol
   ...
Computer                       Arduino




                             Application Code                                  ...
Firmata Demo

Sunday, 28 February 2010
Issues
                    • Works best with a persistent connection
                    • Otherwise startup time and auto...
Ethernet
                           Using Arduino Ethernet Shields




Sunday, 28 February 2010
Ethernet Shields
                    •      Allow direct internet connection
                    •      No computer needed...
Ethernet Shields

Sunday, 28 February 2010
Web Servers
                    • Simpler than you think
                    • A web server:
                      • Liste...
HTTP Requests
                    •      Start with request “GET index.html HTTP/1.1”
                    •      Optional ...
Ethernet Arduino Code
                    • Web server code
                    • Easy to modify




Sunday, 28 February 2...
Ethernet Demo

Sunday, 28 February 2010
Why do this?
                    • Expose yourself to new ideas and new ways of
                           solving problem...
It’s Fun!

Sunday, 28 February 2010
Useful Sites
                           List of useful hardware and software
                           sites




Sunday, ...
Software Sites
                    • Arduino http://www.arduino.cc for software,
                           user forum and...
Hardware Sites
                    • Little Bird Electronics (AUS) http://
                           www.littlebirdelectr...
Other Sites
                    • Lady Ada http://www.ladyada.net/
                    • Evil Mad Scientist http://
      ...
Upcoming SlideShare
Loading in...5
×

Connecting open source hardware to the web

2,328

Published on

Talk given at the Sydney Web Standards Groups. Introduction to the Arduino platform and how to use the Arduino as a web server.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,328
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
63
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Connecting open source hardware to the web

  1. 1. Connecting Open Source Hardware to the Web Justin Mclean Web: http://www.classsoftware.com.au Mail: justin@classsoftware.com.au Twitter: justinmclean Sunday, 28 February 2010
  2. 2. Who am I? • Programming for 25 years • Developing and creating web applications for 15 years • Developer and trainer in Flex and ColdFusion • Adode Community Professional Sunday, 28 February 2010
  3. 3. Arduino Overview of the Arduino Platform Sunday, 28 February 2010
  4. 4. Arduino Platform • Open source hardware and software platform • Easy to program • Hardware is flexible, fast and low power Sunday, 28 February 2010
  5. 5. Arduino Hardware • Comes in a number of shapes sizes • Low cost • Easy to extend Sunday, 28 February 2010
  6. 6. Arduino Boards Sunday, 28 February 2010
  7. 7. Arduino Shields Sunday, 28 February 2010
  8. 8. 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 Sunday, 28 February 2010
  9. 9. 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 Sunday, 28 February 2010
  10. 10. Arduino IDE Sunday, 28 February 2010
  11. 11. Led Shield Demo Sunday, 28 February 2010
  12. 12. Issues • Debugging can be hard • Memory, power and speed limits • Helps to have a little electronic knowledge Sunday, 28 February 2010
  13. 13. Connecting Arduinos to the Web How Arduinos can communicate with the outside world. Sunday, 28 February 2010
  14. 14. Connection Methods • Direct to computer • Wireless (XBee modems) • Ethernet or WiFi • “The Cloud” Sunday, 28 February 2010
  15. 15. Supported Languages • Flash and Flex • Processing • Python • Ruby • Java • C, C++, C# and Objective C • .NET Sunday, 28 February 2010
  16. 16. Direct Connection How to communicate with Arduinos via a computer Sunday, 28 February 2010
  17. 17. Direct Communication • Most languages can’t talk USB • Solution: Socket to USB proxy Sunday, 28 February 2010
  18. 18. Layers of Communication • Code Library • Proxy to USB • Program on arduino to USB Sunday, 28 February 2010
  19. 19. Firmata Protocal • Standard Arduino library • Simple binary protocol • Based on MIDI • Easy to extend Sunday, 28 February 2010
  20. 20. Computer Arduino Application Code Arduino Function Calls and Code Events TCP/IP USB Library USB Proxy Firmata Socket Cable Connection Diagram Sunday, 28 February 2010
  21. 21. Firmata Demo Sunday, 28 February 2010
  22. 22. Issues • Works best with a persistent connection • Otherwise startup time and auto reset may be issues • Proxy must be running on computer the Arduino is connected to Sunday, 28 February 2010
  23. 23. Ethernet Using Arduino Ethernet Shields Sunday, 28 February 2010
  24. 24. Ethernet Shields • Allow direct internet connection • No computer needed • Can act as web server or client • Shields need a little configuration Sunday, 28 February 2010
  25. 25. Ethernet Shields Sunday, 28 February 2010
  26. 26. Web Servers • Simpler than you think • A web server: • Listens for connections • Parse requests • Send back status messages/resources requested Sunday, 28 February 2010
  27. 27. HTTP Requests • Start with request “GET index.html HTTP/1.1” • Optional headers “Accept-Language: en” • Empty line • Optional message body (POST and other requests) Sunday, 28 February 2010
  28. 28. Ethernet Arduino Code • Web server code • Easy to modify Sunday, 28 February 2010
  29. 29. Ethernet Demo Sunday, 28 February 2010
  30. 30. 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 Sunday, 28 February 2010
  31. 31. It’s Fun! Sunday, 28 February 2010
  32. 32. Useful Sites List of useful hardware and software sites Sunday, 28 February 2010
  33. 33. 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/ Sunday, 28 February 2010
  34. 34. Hardware Sites • Little Bird Electronics (AUS) http:// www.littlebirdelectronics.com/ • Spark Fun (US) http://www.sparkfun.com/ • Adafruit Industries (US) http:// www.adafruit.com/ • Electronic Goldmine (US) http:// www.goldmine-elec.com/ Sunday, 28 February 2010
  35. 35. 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/ Sunday, 28 February 2010
  1. A particular slide catching your eye?

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

×