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