A Practical Guide to Connecting Hardware to Flex

Justin Mclean
Justin McleanFlex and ColdFusion developer and instructor at Class Software
A PRACTICAL GUIDE TO
                        CONNECTING HARDWARE TO
                        FLEX
                        Justin Mclean
                        Class Software

                        Email: justin@classsoftware.com
                        Twitter: @justinmclean
                        Blog: http://blog.classsoftware.com




Tuesday, 21 June 2011
Who am I?
                    • Director of Class Software for almost 15 years
                    • Developing and creating web applications for
                        15 years
                    • Programming for 25 years
                    • Adobe certified developer and trainer in Flex
                        and ColdFusion
                    • Adobe Community Champion
                    • Based in Sydney Australia




Tuesday, 21 June 2011
Electronics Trends
                    • Low cost components
                    • Small components
                    • Complex components with simple standard
                        interfaces




Tuesday, 21 June 2011
Computing Trends
                    •   Easier to program
                    •   Use of high level languages
                    •   Software tools
                    •   Open source




Tuesday, 21 June 2011
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




Tuesday, 21 June 2011
Arduino
                        Overview of the Arduino Platform




Tuesday, 21 June 2011
Arduino Platform
                    • Open source hardware and software platform
                    • Easy to program
                    • Hardware is flexible, fast, consumes very little
                        power and is cheap




Tuesday, 21 June 2011
Arduino Hardware
                    •   Comes in a number of shapes and sizes
                    •   Low cost
                    •   Easy to extend
                    •   Digital inputs/outputs
                    •   Analog inputs




Tuesday, 21 June 2011
Arduino Boards




Tuesday, 21 June 2011
Arduino Boards




Tuesday, 21 June 2011
Arduino Boards




Tuesday, 21 June 2011
Arduino Boards




Tuesday, 21 June 2011
Arduino Shields




Tuesday, 21 June 2011
Arduino Shields




Tuesday, 21 June 2011
Arduino Shields




Tuesday, 21 June 2011
Arduino Shields




Tuesday, 21 June 2011
Arduino Software Platform
                    •   Open source cross platform IDE
                    •   Alpha but very stable
                    •   Version 1.0 out in the next month
                    •   Updated frequently
                    •   Growing and active community




Tuesday, 21 June 2011
Arduino Code
                    • C/C++ but not scary!
                    • Inbuilt functions to read and set digital and
                        analog inputs and outputs
                    • Includes libraries to perform common
                        hardware or software tasks
                    • Once uploaded programs are permanent




Tuesday, 21 June 2011
Arduino IDE




Tuesday, 21 June 2011
Led Shield Demo




Tuesday, 21 June 2011
Led Shield Demo




Tuesday, 21 June 2011
Issues
                    •   Debugging can be hard
                    •   No simulator
                    •   Memory, power and speed limits
                    •   Helps to have a little electronics knowledge




Tuesday, 21 June 2011
Connecting
                        to the Web
                        How Arduinos can communicate with
                        the world




Tuesday, 21 June 2011
Connection Methods
                    •   Direct to computer (USB)
                    •   Wireless (XBee modems)
                    •   Ethernet or WiFi
                    •   “The Cloud”




Tuesday, 21 June 2011
Supported Languages
                    •   Flash and Flex
                    •   Processing
                    •   Python
                    •   Ruby
                    •   Java
                    •   C, C++, C# and Objective C
                    •   .NET




Tuesday, 21 June 2011
Flex
                        Flex to Arduino direct connection




Tuesday, 21 June 2011
Layers of Communication
                    • Flex to proxy via an Actionscript library
                    • Proxy to USB communication
                    • USB to arduino




Tuesday, 21 June 2011
Computer                       Arduino




                            Flex Code                                       Arduino




                        Function Calls and
                                                                             Code
                              Events


                                              TCP/IP                USB
                             AS3 Glue                   USB Proxy           Firmata
                                              Socket                Cable




                                        Flex to Arduino

Tuesday, 21 June 2011
Flex Led Demo

Tuesday, 21 June 2011
AS3Glue Digital Output
                    • Create arduino instance
                        var arduino:Arduino = new Arduino();
                    • Wait for firmware version
                    • Set digital pin as output
                        arduino.setPinMode(pin, Arduino.OUTPUT);
                    • Turn digital output on
                        arduino.writeDigitalPin(pin, Arduino.HIGH);




Tuesday, 21 June 2011
Danger Shield Demo

Tuesday, 21 June 2011
AS3Glue Analog Input
                    • Turn on analog reporting
                        arduino.setAnalogPinReporting(pin,
                        Arduino.ON);
                    • Listen for changes via event listener
                        arduino.addEventListener
                        (ArduinoEvent.ANALOG_DATA,
                        onReceiveData);

                        public function onReceiveData
                        (event:ArduinoEvent):void { ... }




Tuesday, 21 June 2011
Ethernet
                        Using Arduino Ethernet Shields




Tuesday, 21 June 2011
Ethernet Shields
                    •   Allow direct internet connection
                    •   No dedicated PC needed
                    •   Shields need a little config
                    •   Can act as web server or client




Tuesday, 21 June 2011
Ethernet Shields




Tuesday, 21 June 2011
Ethernet Shields




Tuesday, 21 June 2011
Ethernet Shields




Tuesday, 21 June 2011
Web Servers
                    • Simpler than you think
                    • A web server:
                      • Listens for connections
                      • Parse requests
                      • Send back status messages/resources
                        requested




Tuesday, 21 June 2011
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)




Tuesday, 21 June 2011
Ethernet Arduino Code
                    • Web server code
                    • Easy to modify




Tuesday, 21 June 2011
Ethernet Demo

Tuesday, 21 June 2011
Applications
                         Ideas on how and where to use this
                         technology




Tuesday, 21 June 2011
Environmental Monitoring
                    • Indoors or outdoors
                    • Wide range of sensors
                    • Sleep mode/low power consumption




Tuesday, 21 June 2011
Home Automation
                    • Power and utilities monitoring
                    • Controlling Lights and Heating/Cooling
                    • Garden watering/monitoring




Tuesday, 21 June 2011
Security and Safety
                    • Security systems
                    • Location reporting
                    • Bike jackets




Tuesday, 21 June 2011
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




Tuesday, 21 June 2011
It’s Fun!



Tuesday, 21 June 2011
Questions?
                        Ask now, see me after the session,
                        follow me on twitter @justinmclean
                        or email me at justin@classsoftware.com.
                        Code and slides can be found at
                        http://blog.classsoftware.com




Tuesday, 21 June 2011
Resources
                        Finding out more information




Tuesday, 21 June 2011
Arduino Sites
                    •   Ardunio (http://ardunio.cc)
                    •   Spark fun (http://www.sparkfun.com)
                    •   Lady Ada (http://ladyada.net)
                    •   Seeed Studio (http://www.seeedstudio.com)
                    •   Modern Device (http://moderndevice.com)




Tuesday, 21 June 2011
Electronic Components Suppliers
                    • Electric Goldmine (http://www.goldmine-elec-
                        products.com/)
                    • Digikey (http://www.digikey.com/)
                    • Farnell (http://ww.farnell.com/)




Tuesday, 21 June 2011
Other Sites
                    • Make magazine (http://makezine.com/)
                    • Evil Mad Scientist (http://
                        evilmadscientist.com)
                    • NYC Resistor (http://nycresistor.com)




Tuesday, 21 June 2011
1 of 52

Recommended

Putting your device in a browser or on the web by
Putting your device in a browser or on the webPutting your device in a browser or on the web
Putting your device in a browser or on the webJustin Mclean
3.2K views34 slides
Connecting open source hardware to the web by
Connecting open source hardware to the webConnecting open source hardware to the web
Connecting open source hardware to the webJustin Mclean
1.1K views35 slides
Connecting hardware to ColdFusion by
Connecting hardware to ColdFusionConnecting hardware to ColdFusion
Connecting hardware to ColdFusionJustin Mclean
1.3K views57 slides
Connecting RIAs and hardware together by
Connecting RIAs and hardware togetherConnecting RIAs and hardware together
Connecting RIAs and hardware togetherJustin Mclean
4.6K views52 slides
Taller IoT en la Actualidad by
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la ActualidadLaurence HR
814 views69 slides
BarCamp Melbourne 2012: Internet of Things by
BarCamp Melbourne 2012: Internet of ThingsBarCamp Melbourne 2012: Internet of Things
BarCamp Melbourne 2012: Internet of ThingsAndy Gelme
1.4K views25 slides

More Related Content

What's hot

Internet Of Things, Smart Energy Groups by
Internet Of Things, Smart Energy GroupsInternet Of Things, Smart Energy Groups
Internet Of Things, Smart Energy GroupsAndy Gelme
2.3K views31 slides
Internet Of Things: Hands on: YOW! night by
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightAndy Gelme
2.9K views76 slides
Arduino talk by
Arduino talkArduino talk
Arduino talkkerematam
1.4K views26 slides
Particle Core by
Particle Core Particle Core
Particle Core Alessandro Granato
412 views20 slides
A practical guide to connecting hardware to Flex by
A practical guide to connecting hardware to FlexA practical guide to connecting hardware to Flex
A practical guide to connecting hardware to FlexJustin Mclean
5.1K views50 slides
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem... by
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...Codemotion
742 views33 slides

What's hot(7)

Internet Of Things, Smart Energy Groups by Andy Gelme
Internet Of Things, Smart Energy GroupsInternet Of Things, Smart Energy Groups
Internet Of Things, Smart Energy Groups
Andy Gelme2.3K views
Internet Of Things: Hands on: YOW! night by Andy Gelme
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! night
Andy Gelme2.9K views
Arduino talk by kerematam
Arduino talkArduino talk
Arduino talk
kerematam1.4K views
A practical guide to connecting hardware to Flex by Justin Mclean
A practical guide to connecting hardware to FlexA practical guide to connecting hardware to Flex
A practical guide to connecting hardware to Flex
Justin Mclean5.1K views
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem... by Codemotion
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
Codemotion742 views

Viewers also liked

DLD Practical Lab Work by
DLD Practical Lab WorkDLD Practical Lab Work
DLD Practical Lab WorkBachagul Ghaljai
4.1K views23 slides
Introduction number systems and conversion by
 Introduction number systems and conversion Introduction number systems and conversion
Introduction number systems and conversionkanyuma jitjumnong
5.5K views63 slides
A+ computer hardware slide by
A+ computer hardware slideA+ computer hardware slide
A+ computer hardware slideRajendra Tete
2K views95 slides
Digital 1 8 by
Digital 1 8Digital 1 8
Digital 1 8Sayan Chakraborty
18K views116 slides
Number system conversion by
Number system conversionNumber system conversion
Number system conversionKawsar Hamid Sumon
22.5K views31 slides

Similar to A Practical Guide to Connecting Hardware to Flex

The Internet of Trust and a New Frontier for Exploration by
The Internet of Trust and a New Frontier for ExplorationThe Internet of Trust and a New Frontier for Exploration
The Internet of Trust and a New Frontier for Explorationl2myowndevices
556 views24 slides
Breaking The Confinement Cycle Using Linux by
Breaking The Confinement Cycle Using LinuxBreaking The Confinement Cycle Using Linux
Breaking The Confinement Cycle Using LinuxSpencer Hunley
265 views17 slides
Connecting Hardware to Flex (360MAX) by
Connecting Hardware to Flex (360MAX)Connecting Hardware to Flex (360MAX)
Connecting Hardware to Flex (360MAX)Justin Mclean
700 views50 slides
Edge Of The Web by
Edge Of The WebEdge Of The Web
Edge Of The WebJustin Mclean
910 views49 slides
Building IoT with Arduino Day One by
Building IoT with Arduino Day One Building IoT with Arduino Day One
Building IoT with Arduino Day One Anthony Faustine
3K views56 slides
A Practical Guide to Connecting Hardware to the Web by
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
1.6K views49 slides

Similar to A Practical Guide to Connecting Hardware to Flex(20)

The Internet of Trust and a New Frontier for Exploration by l2myowndevices
The Internet of Trust and a New Frontier for ExplorationThe Internet of Trust and a New Frontier for Exploration
The Internet of Trust and a New Frontier for Exploration
l2myowndevices556 views
Breaking The Confinement Cycle Using Linux by Spencer Hunley
Breaking The Confinement Cycle Using LinuxBreaking The Confinement Cycle Using Linux
Breaking The Confinement Cycle Using Linux
Spencer Hunley265 views
Connecting Hardware to Flex (360MAX) by Justin Mclean
Connecting Hardware to Flex (360MAX)Connecting Hardware to Flex (360MAX)
Connecting Hardware to Flex (360MAX)
Justin Mclean700 views
A Practical Guide to Connecting Hardware to the Web by elliando dias
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
elliando dias1.6K views
Netloab toolkit 1112 by 馬 萬圳
Netloab toolkit 1112Netloab toolkit 1112
Netloab toolkit 1112
馬 萬圳3K views
UniK: Deploy Unikernels with Ease by Scott Weiss
UniK: Deploy Unikernels with EaseUniK: Deploy Unikernels with Ease
UniK: Deploy Unikernels with Ease
Scott Weiss655 views
Language Matters: JavaScript 
from IoT Product Concept 
to Production by Kinoma
Language Matters: JavaScript 
from IoT Product Concept 
to ProductionLanguage Matters: JavaScript 
from IoT Product Concept 
to Production
Language Matters: JavaScript 
from IoT Product Concept 
to Production
Kinoma1.3K views
Product Development in the Age of Cloud Native by John Mark Walker
Product Development in the Age of Cloud NativeProduct Development in the Age of Cloud Native
Product Development in the Age of Cloud Native
John Mark Walker276 views
arduino by jhcid
 arduino arduino
arduino
jhcid524 views
Enabling DevOps for IoT software development, powered by Open Source, OW2onli... by OW2
Enabling DevOps for IoT software development, powered by Open Source, OW2onli...Enabling DevOps for IoT software development, powered by Open Source, OW2onli...
Enabling DevOps for IoT software development, powered by Open Source, OW2onli...
OW2158 views
Supporting Parallel Component Debugging Using the GDB Python Interface by wazari972
Supporting Parallel Component Debugging Using the GDB Python InterfaceSupporting Parallel Component Debugging Using the GDB Python Interface
Supporting Parallel Component Debugging Using the GDB Python Interface
wazari972684 views
Making the Managed Energy Home a Reality by Pilgrim Beart
Making the Managed Energy Home a RealityMaking the Managed Energy Home a Reality
Making the Managed Energy Home a Reality
Pilgrim Beart1.1K views

Recently uploaded

Unit 1_Lecture 2_Physical Design of IoT.pdf by
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdfStephenTec
12 views36 slides
Piloting & Scaling Successfully With Microsoft Viva by
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft VivaRichard Harbridge
12 views160 slides
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
368 views92 slides
Scaling Knowledge Graph Architectures with AI by
Scaling Knowledge Graph Architectures with AIScaling Knowledge Graph Architectures with AI
Scaling Knowledge Graph Architectures with AIEnterprise Knowledge
30 views15 slides
The details of description: Techniques, tips, and tangents on alternative tex... by
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...BookNet Canada
127 views24 slides
AMAZON PRODUCT RESEARCH.pdf by
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdfJerikkLaureta
26 views13 slides

Recently uploaded(20)

Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada127 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta26 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada136 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst478 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
handbook for web 3 adoption.pdf by Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex22 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views

A Practical Guide to Connecting Hardware to Flex

  • 1. A PRACTICAL GUIDE TO CONNECTING HARDWARE TO FLEX Justin Mclean Class Software Email: justin@classsoftware.com Twitter: @justinmclean Blog: http://blog.classsoftware.com Tuesday, 21 June 2011
  • 2. Who am I? • Director of Class Software for almost 15 years • Developing and creating web applications for 15 years • Programming for 25 years • Adobe certified developer and trainer in Flex and ColdFusion • Adobe Community Champion • Based in Sydney Australia Tuesday, 21 June 2011
  • 3. Electronics Trends • Low cost components • Small components • Complex components with simple standard interfaces Tuesday, 21 June 2011
  • 4. Computing Trends • Easier to program • Use of high level languages • Software tools • Open source Tuesday, 21 June 2011
  • 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 Tuesday, 21 June 2011
  • 6. Arduino Overview of the Arduino Platform Tuesday, 21 June 2011
  • 7. Arduino Platform • Open source hardware and software platform • Easy to program • Hardware is flexible, fast, consumes very little power and is cheap Tuesday, 21 June 2011
  • 8. Arduino Hardware • Comes in a number of shapes and sizes • Low cost • Easy to extend • Digital inputs/outputs • Analog inputs Tuesday, 21 June 2011
  • 17. Arduino Software Platform • Open source cross platform IDE • Alpha but very stable • Version 1.0 out in the next month • Updated frequently • Growing and active community Tuesday, 21 June 2011
  • 18. Arduino Code • C/C++ but not scary! • Inbuilt functions to read and set digital and analog inputs and outputs • Includes libraries to perform common hardware or software tasks • Once uploaded programs are permanent Tuesday, 21 June 2011
  • 20. Led Shield Demo Tuesday, 21 June 2011
  • 21. Led Shield Demo Tuesday, 21 June 2011
  • 22. Issues • Debugging can be hard • No simulator • Memory, power and speed limits • Helps to have a little electronics knowledge Tuesday, 21 June 2011
  • 23. Connecting to the Web How Arduinos can communicate with the world Tuesday, 21 June 2011
  • 24. Connection Methods • Direct to computer (USB) • Wireless (XBee modems) • Ethernet or WiFi • “The Cloud” Tuesday, 21 June 2011
  • 25. Supported Languages • Flash and Flex • Processing • Python • Ruby • Java • C, C++, C# and Objective C • .NET Tuesday, 21 June 2011
  • 26. Flex Flex to Arduino direct connection Tuesday, 21 June 2011
  • 27. Layers of Communication • Flex to proxy via an Actionscript library • Proxy to USB communication • USB to arduino Tuesday, 21 June 2011
  • 28. Computer Arduino Flex Code Arduino Function Calls and Code Events TCP/IP USB AS3 Glue USB Proxy Firmata Socket Cable Flex to Arduino Tuesday, 21 June 2011
  • 29. Flex Led Demo Tuesday, 21 June 2011
  • 30. AS3Glue Digital Output • Create arduino instance var arduino:Arduino = new Arduino(); • Wait for firmware version • Set digital pin as output arduino.setPinMode(pin, Arduino.OUTPUT); • Turn digital output on arduino.writeDigitalPin(pin, Arduino.HIGH); Tuesday, 21 June 2011
  • 32. AS3Glue Analog Input • Turn on analog reporting arduino.setAnalogPinReporting(pin, Arduino.ON); • Listen for changes via event listener arduino.addEventListener (ArduinoEvent.ANALOG_DATA, onReceiveData); public function onReceiveData (event:ArduinoEvent):void { ... } Tuesday, 21 June 2011
  • 33. Ethernet Using Arduino Ethernet Shields Tuesday, 21 June 2011
  • 34. Ethernet Shields • Allow direct internet connection • No dedicated PC needed • Shields need a little config • Can act as web server or client Tuesday, 21 June 2011
  • 38. Web Servers • Simpler than you think • A web server: • Listens for connections • Parse requests • Send back status messages/resources requested Tuesday, 21 June 2011
  • 39. 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) Tuesday, 21 June 2011
  • 40. Ethernet Arduino Code • Web server code • Easy to modify Tuesday, 21 June 2011
  • 42. Applications Ideas on how and where to use this technology Tuesday, 21 June 2011
  • 43. Environmental Monitoring • Indoors or outdoors • Wide range of sensors • Sleep mode/low power consumption Tuesday, 21 June 2011
  • 44. Home Automation • Power and utilities monitoring • Controlling Lights and Heating/Cooling • Garden watering/monitoring Tuesday, 21 June 2011
  • 45. Security and Safety • Security systems • Location reporting • Bike jackets Tuesday, 21 June 2011
  • 46. 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 Tuesday, 21 June 2011
  • 48. Questions? Ask now, see me after the session, follow me on twitter @justinmclean or email me at justin@classsoftware.com. Code and slides can be found at http://blog.classsoftware.com Tuesday, 21 June 2011
  • 49. Resources Finding out more information Tuesday, 21 June 2011
  • 50. Arduino Sites • Ardunio (http://ardunio.cc) • Spark fun (http://www.sparkfun.com) • Lady Ada (http://ladyada.net) • Seeed Studio (http://www.seeedstudio.com) • Modern Device (http://moderndevice.com) Tuesday, 21 June 2011
  • 51. Electronic Components Suppliers • Electric Goldmine (http://www.goldmine-elec- products.com/) • Digikey (http://www.digikey.com/) • Farnell (http://ww.farnell.com/) Tuesday, 21 June 2011
  • 52. Other Sites • Make magazine (http://makezine.com/) • Evil Mad Scientist (http:// evilmadscientist.com) • NYC Resistor (http://nycresistor.com) Tuesday, 21 June 2011