Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Fiddling With Phidgets

1,685 views

Published on

veryone has seen lots of Rich Internet Applications on the web and on the desktop using Flash, Flex and AIR.

Awesome games with mind blowing (3D) graphics and astonishing real-time business applications are actually just the tip of the iceberg.

In this session you’ll learn about coupling these cross-platform and cross-device technologies to hardware such as motors, sensors and RFIDs, which allows you to create all kinds of robots and some real world fun and games.

To take it even one step further you’ll discover how you can take advantage of mobile devices to take control of that hardware. Whether it’s domotics, robots or games, the only limit is your imagination…

  • Be the first to comment

Fiddling With Phidgets

  1. 1. Fiddling with Phidgets Connecting to hardware
  2. 2. Who Am I?Steven PeetersUnit manager / Instructor / consultant at multimediacollegeTM• Adobe Flex, AIR, Flash Catalyst & ColdFusion Certified Instructor• Adobe Community Professional• ColdFusion User Group Manager• 12+ years of development experience• Flex & AIR since 2004• Author for Friends of ED Email: steven@multimediacollege.be LinkedIn: www.linkedin.com/in/stevenpeeters Twitter: @aikisteve Blog www.flexpert.be Website www.multimediacollege.be
  3. 3. Topics• Arduino• Phidgets• Other hardwareTwitter hash tag: #fiddlingphidgets
  4. 4. Getting started• Yeah, how did I get started on this?
  5. 5. Getting started• Yeah, how did I get started on this? • College
  6. 6. Getting started• Yeah, how did I get started on this? • College • Prototype This
  7. 7. Getting started• Yeah, how did I get started on this? • College • Prototype This • Grant Skinner
  8. 8. Differences Boards, light sensors,Components Boards motors, displays, ... Shields: XBee, Ethernet, Thermocouple,Third party motors electrodes, sensors, ... Out of the boxEase of use Build your own stuff components Cheap, build your own Don’t worry about Advantage components making mistakesDisadvantage Build your own stuff Little bit more expensive
  9. 9. Differences Boards, light sensors,Components Boards motors, displays, ... Shields: XBee, Ethernet, Thermocouple,Third party motors electrodes, sensors, ... Out of the boxEase of use Build your own stuff components Cheap, build your own Don’t worry about Advantage components making mistakesDisadvantage Build your own stuff Little bit more expensive
  10. 10. Differences Boards, light sensors,Components Boards motors, displays, ... Shields: XBee, Ethernet, Thermocouple,Third party motors electrodes, sensors, ... Out of the boxEase of use Build your own stuff components Cheap, build your own Don’t worry about Advantage components making mistakesDisadvantage Build your own stuff Little bit more expensive
  11. 11. Differences Boards, light sensors,Components Boards motors, displays, ... Shields: XBee, Ethernet, Thermocouple,Third party motors electrodes, sensors, ... Out of the boxEase of use Build your own stuff components Cheap, build your own Don’t worry about Advantage components making mistakesDisadvantage Build your own stuff Little bit more expensive
  12. 12. Differences Boards, light sensors,Components Boards motors, displays, ... Shields: XBee, Ethernet, Thermocouple,Third party motors electrodes, sensors, ... Out of the boxEase of use Build your own stuff components Cheap, build your own Don’t worry about Advantage components making mistakesDisadvantage Build your own stuff Little bit more expensive
  13. 13. Differences Boards, light sensors,Components Boards motors, displays, ... Shields: XBee, Ethernet, Thermocouple,Third party motors electrodes, sensors, ... Out of the boxEase of use Build your own stuff components Cheap, build your own Don’t worry about Advantage components making mistakesDisadvantage Build your own stuff Little bit more expensive
  14. 14. Arduino• http://www.arduino.cc• Shields (add-ons)• Get started for only $30
  15. 15. Arduino shields
  16. 16. Arduino shields
  17. 17. Programming Arduino
  18. 18. Programming Arduino• Open-source
  19. 19. Programming Arduino• Open-source• Large community
  20. 20. Programming Arduino• Open-source• Large community• Lots of example available
  21. 21. Programming Arduino• Open-source• Large community• Lots of example available• Language based on processing
  22. 22. Programming Arduino• Open-source• Large community• Lots of example available• Language based on processing• extensible with C, C++, Flash...
  23. 23. Programming Arduino• Open-source• Large community• Lots of example available• Language based on processing• extensible with C, C++, Flash...• examples in the IDE and on http://tv.adobe.com
  24. 24. Programming Arduino• Connecting to Flash/Flex
  25. 25. Programming Arduino• Connecting to Flash/Flex • Upload Firmata program to board
  26. 26. Programming Arduino• Connecting to Flash/Flex • Upload Firmata program to board • SerProxy/TinkerProxy
  27. 27. Programming Arduino• Connecting to Flash/Flex • Upload Firmata program to board • SerProxy/TinkerProxy • AS3Glue: http://code.google.com/p/as3glue/
  28. 28. Programming Arduino• Connecting to Flash/Flex • Upload Firmata program to board • SerProxy/TinkerProxy • AS3Glue: http://code.google.com/p/as3glue/ • Use Arduino object methods
  29. 29. Arduino Exampleprivate var arduino:Arduino;private function initApp():void { arduino = new Arduino("localhost", 5331); arduino.setPinMode(13, Arduino.OUTPUT); arduino.writeDigitalPin(13, Arduino.HIGH); var value:int = arduino.getAnalogData(2);}
  30. 30. Phidgets• http://www.phidgets.com• Lots of components• Get started for $77
  31. 31. Phidgets components
  32. 32. Phidgets Programming Languages• Flash • C#• Flex • Python• Java • MathLAB• Delphi •C• Cocoa • C++• Visual Basic • ...
  33. 33. Programming Phidgets• Connecting to Flash/Flex
  34. 34. Programming Phidgets• Connecting to Flash/Flex • Install drivers for boards
  35. 35. Programming Phidgets• Connecting to Flash/Flex • Install drivers for boards • Run web service
  36. 36. Programming Phidgets• Connecting to Flash/Flex • Install drivers for boards • Run web service • Use Phigets21Library.swc
  37. 37. Phidgets Servo Motor Exampleprivate var phidgetsServo:PhidgetAdvancedServo;protected function initApp():void { phidgetsServo = new PhidgetAdvancedServo(); phidgetsServo.addEventListener(PhidgetEvent.ATTACH, onAttach); phidgetsServo.open("localhost", 5001);}private function onAttach(event:PhidgetEvent):void { phidgetsServo.setPosition(0, 120); phidgetsServo.setPosition(1, 120); phidgetsServo.setPosition(4, 120); phidgetsServo.setPosition(5, 120);}
  38. 38. Phidgets Interface Exampleprivate var phidgetsInterfaceKit:PhidgetInterfaceKit;protected function initApp():void { phidgetsInterfaceKit = new PhidgetInterfaceKit(); phidgetsInterfaceKit.addEventListener(PhidgetEvent.ATTACH, onAttach); phidgetsInterfaceKit.addEventListener(PhidgetDataEvent.SENSOR_CHANGE, onSensorChange); phidgetsInterfaceKit.open("localhost", 5001);}private function onInterfaceAttach(event:PhidgetEvent):void { phidgetsInterfaceKit.setOutputState(0, true); phidgetsInterfaceKit.setOutputState(1, false);}private function onSensorChange(event:PhidgetDataEvent):void { trace("sensor value = " + Number(event.Data));}
  39. 39. Phidgets showcaseRemote controlled maze
  40. 40. Under the hood
  41. 41. The only limit is your imagination
  42. 42. The only limit is your imagination
  43. 43. The only limit is your imagination
  44. 44. Thank you Twitter: @aikisteve Email: steven@multimediacollege.be Personal site: www.flexpert.be

×