Your SlideShare is downloading. ×
0
Connecting Hardware to
                          ColdFusion
                          Justin Mclean
                      ...
Who am I?
                     • Director of Class Software for 10 + years
                     • Developing and creating ...
Electronics Trends
                     • Low cost components
                     • Small components
                    ...
Computing Trends
                     •    Easier to program
                     •    Use of high level languages
       ...
Are We There Yet?
                     • Low cost fast devices
                     • It’s easy to communicate between dev...
Arduino
                          Overview of the Arduino Platform




Saturday, 24 April 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




Saturday, 24 April 2010
Arduino Boards




Saturday, 24 April 2010
Arduino Boards




Saturday, 24 April 2010
Arduino Boards




Saturday, 24 April 2010
Arduino Shields




Saturday, 24 April 2010
Arduino Shields




Saturday, 24 April 2010
Arduino Shields




Saturday, 24 April 2010
Arduino Shields




Saturday, 24 April 2010
Arduino Software Platform
                     •    Open source cross platform IDE
                     •    Alpha but ver...
Arduino Code
                     • C like high level language
                     • Inbuilt functions to read and set di...
Arduino IDE




Saturday, 24 April 2010
Led Shield Demo




Saturday, 24 April 2010
Led Shield Demo




Saturday, 24 April 2010
Issues
                     •    Debugging can be hard
                     •    No simulator
                     •    Me...
Connecting
                          ColdFusion
                          How to communicate between
                     ...
ColdFusion Communication
                     • ColdFusion can’t easily talk USB
                     • Use a socket to US...
Layers of Communication
                     • ColdFusion to proxy via Java/CFML code
                     • Proxy to USB ...
Connection Diagram

                                               Computer                       Arduino




            ...
Firmata Protocol
                     •    Simple Binary Protocol
                     •    Based on MIDI
                ...
Firmata Protocol
                                  Type     Command    MIDI   Byte #1     Btye #2

                       ...
ColdFusion Socket
                     • Mixed Java/CFML code
                     • ColdFusion 8 or 9 makes it easy




S...
ColdFusion Arduino
                     •    Alpha software
                     •    ColdFusion implementation of Firmata...
ColdFusion Arduino Demo




Saturday, 24 April 2010
Issues
                     •    Arduino startup time
                     •    Auto reset
                     •    Not a...
Ethernet
                          Using Arduino Ethernet Shields




Saturday, 24 April 2010
Ethernet Shields
                     •    Allow direct internet connection
                     •    No dedicated PC need...
Ethernet Shields




Saturday, 24 April 2010
Ethernet Shields




Saturday, 24 April 2010
Ethernet Shields




Saturday, 24 April 2010
Ethernet Arduino Code
                     • Can run as web server
                     • Code easy to write or modify



...
ColdFusion Code
                     •    CFHTTP to get data
                     •    Data returned as XML
              ...
ColdFusion Ethernet Demo




Saturday, 24 April 2010
Pachube
                          An easier way to connect Arduinos




Saturday, 24 April 2010
Pachube
                     •    Store and share and access realtime sensor data
                     •    Simple and sec...
Pachube




Saturday, 24 April 2010
Pachube




Saturday, 24 April 2010
Pachube




Saturday, 24 April 2010
Pachube API
                     •    Communicates HTTP
                     •    Plain text (csv), XML or Jason
         ...
Pachube Arduino Code
                     • Runs on Arduino with ethernet shield
                     • Sends values to Pa...
ColdFusion
                     •    Call pachube API using CFHTTP
                     •    ParseXML()
                  ...
Demo




Saturday, 24 April 2010
Pachube Triggers
                     • Pachube can call an URL when an analog or
                          digital value ...
Why do this?
                     • Expose yourself to new ideas and new ways of
                          solving problem...
It’s Fun!


Saturday, 24 April 2010
Questions?
                          Ask now, see me after session or email
                          justin@classsoftware...
Useful Sites
                          List of useful hardware and software sites




Saturday, 24 April 2010
Software Sites
                     • Arduino http://www.arduino.cc for software, user
                          forum and...
Hardware Sites
                     • Spark Fun (US) http://www.sparcfun.com/
                     • Adafruit Industries (...
Other Sites
                     • Lady Ada http://www.ladyada.com/
                     • Evil Mad Scientist http://
    ...
Upcoming SlideShare
Loading in...5
×

Connecting hardware to ColdFusion

2,099

Published on

This session will look at the revolution in low cost easy to program embedded computing. It focuses on the Arduino open source hardware and software platform and how this can be connected to and communicate with ColdFusion. Topics covered include how to implement the Firmata protocol in ColdFusion, using Arduino Ethernet shields and unsing Pachube.

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

  • Be the first to like this

No Downloads
Views
Total Views
2,099
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Connecting hardware to ColdFusion"

  1. 1. Connecting Hardware to ColdFusion Justin Mclean Email: justin@classsoftware.com Twitter: @justinmclean Blog: http://blog.classsoftware.com Saturday, 24 April 2010
  2. 2. Who am I? • Director of Class Software for 10 + years • Developing and creating web applications for 15 years • Programming for 25 years • Adobe Community Professional • Adobe certified developer and trainer in ColdFusion and Flex • Based in Sydney Australia Saturday, 24 April 2010
  3. 3. Electronics Trends • Low cost components • Small components • Complex components with simple standard interfaces Saturday, 24 April 2010
  4. 4. Computing Trends • Easier to program • Use of high level languages • Software tools • Open source Saturday, 24 April 2010
  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 Saturday, 24 April 2010
  6. 6. Arduino Overview of the Arduino Platform Saturday, 24 April 2010
  7. 7. Arduino Platform • Open source hardware and software platform • Easy to program • Hardware is flexible, fast, low power and low cost Saturday, 24 April 2010
  8. 8. Arduino Hardware • Comes in a number of shapes sizes • Low cost • Easy to extend Saturday, 24 April 2010
  9. 9. Arduino Boards Saturday, 24 April 2010
  10. 10. Arduino Boards Saturday, 24 April 2010
  11. 11. Arduino Boards Saturday, 24 April 2010
  12. 12. Arduino Boards Saturday, 24 April 2010
  13. 13. Arduino Shields Saturday, 24 April 2010
  14. 14. Arduino Shields Saturday, 24 April 2010
  15. 15. Arduino Shields Saturday, 24 April 2010
  16. 16. Arduino Shields Saturday, 24 April 2010
  17. 17. Arduino Software Platform • Open source cross platform IDE • Alpha but very stable • Updated frequently • Growing and active community Saturday, 24 April 2010
  18. 18. 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 Saturday, 24 April 2010
  19. 19. Arduino IDE Saturday, 24 April 2010
  20. 20. Led Shield Demo Saturday, 24 April 2010
  21. 21. Led Shield Demo Saturday, 24 April 2010
  22. 22. Issues • Debugging can be hard • No simulator • Memory, power and speed limits • Helps to have a little electronics knowledge Saturday, 24 April 2010
  23. 23. Connecting ColdFusion How to communicate between ColdFusion and the Arduino Platform Saturday, 24 April 2010
  24. 24. ColdFusion Communication • ColdFusion can’t easily talk USB • Use a socket to USB proxy • ColdFusion can’t easily talk raw sockets Saturday, 24 April 2010
  25. 25. Layers of Communication • ColdFusion to proxy via Java/CFML code • Proxy to USB communication • USB to Arduino Saturday, 24 April 2010
  26. 26. Connection Diagram Computer Arduino Application Code Arduino Function Calls and Code Events TCP/IP USB Library USB Proxy Firmata Socket Cable Saturday, 24 April 2010
  27. 27. Firmata Protocol • Simple Binary Protocol • Based on MIDI • Easy to extend • Standard Arduino software library Saturday, 24 April 2010
  28. 28. Firmata Protocol Type Command MIDI Byte #1 Btye #2 Analog 0xE0 pin Bits 0-6 Bits 7-13 Digital 0x90 port Bits 0-6 Bits 7-13 Report Analog 0xC0 pin 0 or 1 Report Digital 0xD0 port 0 or 1 Pin Mode 0xF4 port 0 or 1 Version 0xF9 Reset 0xFF Saturday, 24 April 2010
  29. 29. ColdFusion Socket • Mixed Java/CFML code • ColdFusion 8 or 9 makes it easy Saturday, 24 April 2010
  30. 30. ColdFusion Arduino • Alpha software • ColdFusion implementation of Firmata • Read analog values • Read/write digital values Saturday, 24 April 2010
  31. 31. ColdFusion Arduino Demo Saturday, 24 April 2010
  32. 32. Issues • Arduino startup time • Auto reset • Not a persistent connect • Proxy must be running on machine Arduino is connected to • Use under load Saturday, 24 April 2010
  33. 33. Ethernet Using Arduino Ethernet Shields Saturday, 24 April 2010
  34. 34. Ethernet Shields • Allow direct internet connection • No dedicated PC needed • Shields need a little config • Can act as web server or client Saturday, 24 April 2010
  35. 35. Ethernet Shields Saturday, 24 April 2010
  36. 36. Ethernet Shields Saturday, 24 April 2010
  37. 37. Ethernet Shields Saturday, 24 April 2010
  38. 38. Ethernet Arduino Code • Can run as web server • Code easy to write or modify Saturday, 24 April 2010
  39. 39. ColdFusion Code • CFHTTP to get data • Data returned as XML • Parse XML via ParseXML() • Display or act on values Saturday, 24 April 2010
  40. 40. ColdFusion Ethernet Demo Saturday, 24 April 2010
  41. 41. Pachube An easier way to connect Arduinos Saturday, 24 April 2010
  42. 42. Pachube • Store and share and access realtime sensor data • Simple and secure • API to interact with all data and services • Graphs and maps Saturday, 24 April 2010
  43. 43. Pachube Saturday, 24 April 2010
  44. 44. Pachube Saturday, 24 April 2010
  45. 45. Pachube Saturday, 24 April 2010
  46. 46. Pachube API • Communicates HTTP • Plain text (csv), XML or Jason • REST based • Large base of supported languages Saturday, 24 April 2010
  47. 47. Pachube Arduino Code • Runs on Arduino with ethernet shield • Sends values to Pachube • Can request values directly or via Pachube Saturday, 24 April 2010
  48. 48. ColdFusion • Call pachube API using CFHTTP • ParseXML() • XML is in EEML format • Display or act on values Saturday, 24 April 2010
  49. 49. Demo Saturday, 24 April 2010
  50. 50. Pachube Triggers • Pachube can call an URL when an analog or digital value changes or goes over or under a value • The URL can be ColdFusion URL Saturday, 24 April 2010
  51. 51. 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 Saturday, 24 April 2010
  52. 52. It’s Fun! Saturday, 24 April 2010
  53. 53. Questions? Ask now, see me after session or email justin@classsoftware.com Saturday, 24 April 2010
  54. 54. Useful Sites List of useful hardware and software sites Saturday, 24 April 2010
  55. 55. 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/ Saturday, 24 April 2010
  56. 56. Hardware Sites • Spark Fun (US) http://www.sparcfun.com/ • Adafruit Industries (US) http:// www.adafruit.com/ • Electronic Goldmine (US) http://www.goldmine- elec.com/ Saturday, 24 April 2010
  57. 57. Other Sites • Lady Ada http://www.ladyada.com/ • Evil Mad Scientist http:// www.evilmadscientist.com/ • NY Resistor http://www.nycresistor.com/ • Make Zine http://www.makezine.com/ Saturday, 24 April 2010
  1. A particular slide catching your eye?

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

×