SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Internet Of Things, Smart Energy Groups
Internet Of Things, Smart Energy GroupsInternet Of Things, Smart Energy Groups
Internet Of Things, Smart Energy GroupsAndy Gelme
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightAndy Gelme
 
Arduino talk
Arduino talkArduino talk
Arduino talkkerematam
 
A practical guide to connecting hardware to Flex
A practical guide to connecting hardware to FlexA practical guide to connecting hardware to Flex
A practical guide to connecting hardware to FlexJustin Mclean
 
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...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...Codemotion
 

Was ist angesagt? (7)

Internet Of Things, Smart Energy Groups
Internet Of Things, Smart Energy GroupsInternet Of Things, Smart Energy Groups
Internet Of Things, Smart Energy Groups
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! night
 
Arduino talk
Arduino talkArduino talk
Arduino talk
 
Particle Core
Particle Core Particle Core
Particle Core
 
A practical guide to connecting hardware to Flex
A practical guide to connecting hardware to FlexA practical guide to connecting hardware to Flex
A practical guide to connecting hardware to Flex
 
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...
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codem...
 
Cc internet of things @ Thomas More
Cc internet of things @ Thomas MoreCc internet of things @ Thomas More
Cc internet of things @ Thomas More
 

Andere mochten auch (9)

DLD Practical Lab Work
DLD Practical Lab WorkDLD Practical Lab Work
DLD Practical Lab Work
 
Introduction number systems and conversion
 Introduction number systems and conversion Introduction number systems and conversion
Introduction number systems and conversion
 
Number bases
Number basesNumber bases
Number bases
 
A+ computer hardware slide
A+ computer hardware slideA+ computer hardware slide
A+ computer hardware slide
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
 
Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
Computer Hardware
Computer HardwareComputer Hardware
Computer Hardware
 
CBSE XII Boolean Algebra
CBSE XII Boolean AlgebraCBSE XII Boolean Algebra
CBSE XII Boolean Algebra
 
Computer hardware component. ppt
Computer hardware component. pptComputer hardware component. ppt
Computer hardware component. ppt
 

Ähnlich wie A Practical Guide to Connecting Hardware to Flex

The Internet of Trust and a New Frontier for Exploration
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
 
Breaking The Confinement Cycle Using Linux
Breaking The Confinement Cycle Using LinuxBreaking The Confinement Cycle Using Linux
Breaking The Confinement Cycle Using LinuxSpencer Hunley
 
Connecting Hardware to Flex (360MAX)
Connecting Hardware to Flex (360MAX)Connecting Hardware to Flex (360MAX)
Connecting Hardware to Flex (360MAX)Justin Mclean
 
Building IoT with Arduino Day One
Building IoT with Arduino Day One Building IoT with Arduino Day One
Building IoT with Arduino Day One Anthony Faustine
 
A Practical Guide to Connecting Hardware to the Web
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
 
Netloab toolkit 1112
Netloab toolkit 1112Netloab toolkit 1112
Netloab toolkit 1112馬 萬圳
 
UniK: Deploy Unikernels with Ease
UniK: Deploy Unikernels with EaseUniK: Deploy Unikernels with Ease
UniK: Deploy Unikernels with EaseScott Weiss
 
Language Matters: JavaScript 
from IoT Product Concept 
to Production
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 ProductionKinoma
 
Product Development in the Age of Cloud Native
Product Development in the Age of Cloud NativeProduct Development in the Age of Cloud Native
Product Development in the Age of Cloud NativeJohn Mark Walker
 
arduino
 arduino arduino
arduinojhcid
 
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...
Enabling DevOps for IoT software development, powered by Open Source, OW2onli...OW2
 
Supporting Parallel Component Debugging Using the GDB Python Interface
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 Interfacewazari972
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and TellE. Camden Fisher
 
Making the Managed Energy Home a Reality
Making the Managed Energy Home a RealityMaking the Managed Energy Home a Reality
Making the Managed Energy Home a RealityPilgrim Beart
 

Ähnlich wie A Practical Guide to Connecting Hardware to Flex (20)

The Internet of Trust and a New Frontier for Exploration
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
 
Breaking The Confinement Cycle Using Linux
Breaking The Confinement Cycle Using LinuxBreaking The Confinement Cycle Using Linux
Breaking The Confinement Cycle Using Linux
 
Connecting Hardware to Flex (360MAX)
Connecting Hardware to Flex (360MAX)Connecting Hardware to Flex (360MAX)
Connecting Hardware to Flex (360MAX)
 
Edge Of The Web
Edge Of The WebEdge Of The Web
Edge Of The Web
 
Building IoT with Arduino Day One
Building IoT with Arduino Day One Building IoT with Arduino Day One
Building IoT with Arduino Day One
 
A Practical Guide to Connecting Hardware to the Web
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
 
Netloab toolkit 1112
Netloab toolkit 1112Netloab toolkit 1112
Netloab toolkit 1112
 
UniK: Deploy Unikernels with Ease
UniK: Deploy Unikernels with EaseUniK: Deploy Unikernels with Ease
UniK: Deploy Unikernels with Ease
 
Language Matters: JavaScript 
from IoT Product Concept 
to Production
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
 
Product Development in the Age of Cloud Native
Product Development in the Age of Cloud NativeProduct Development in the Age of Cloud Native
Product Development in the Age of Cloud Native
 
eLabFTW review
eLabFTW revieweLabFTW review
eLabFTW review
 
arduino
 arduino arduino
arduino
 
Apps on Silicon
Apps on SiliconApps on Silicon
Apps on Silicon
 
Cross platform mobile development
Cross platform mobile development  Cross platform mobile development
Cross platform mobile development
 
5 pen pc
5 pen pc 5 pen pc
5 pen pc
 
DinhHoangTu-CV
DinhHoangTu-CVDinhHoangTu-CV
DinhHoangTu-CV
 
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...
Enabling DevOps for IoT software development, powered by Open Source, OW2onli...
 
Supporting Parallel Component Debugging Using the GDB Python Interface
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
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
 
Making the Managed Energy Home a Reality
Making the Managed Energy Home a RealityMaking the Managed Energy Home a Reality
Making the Managed Energy Home a Reality
 

Kürzlich hochgeladen

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Kürzlich hochgeladen (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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