SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
Connecting Hardware to
Flex
 A practical guide to connecting open source
 hardware (Arduino’s) to Flex

 Justin Mclean
 Class Software
Who am I?
• Director of Class Software for 10 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
Electronics Trends
• Low cost small components
• More complex components with simple
  standard interfaces
• Cheap low volume board manufacture
Computing Trends
•   Easier to program
•   Use of high level languages
•   Software tools
•   Open source
Communication Trends
• Low cost long range wireless
• Mesh networks
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
• Commercial and open source products and
  kits are available
Arduino
Open source hardware and software
platform
Arduino Platform
• Open source hardware and software platform
• Easy to program
• Hardware is flexible, fast, low power and low
  cost
Arduino Hardware
•   Comes in a number of shapes sizes
•   Low cost
•   Easy to program
•   Easy to extend
Arduino Boards
Arduino Boards
Arduino Boards
Arduino Boards
Arduino Shields
Arduino Shields
Arduino Shields
Arduino Shields
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
Arduino IDE
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
Led Shield Demo
Led Shield Demo
Setup and Loop Functions
• Setup function called once
  void setup() {
  ...
  }
• Loop function called over and over again
  void loop() {
  ...
  }
Setting Digital Outputs
• Set digital pin as output in setup
  pinMode(pin, OUTPUT);
• Digital outputs turned on or off in setup or
  loop

  digitalWrite(pin, HIGH);

  digitalWrite(pin, LOW);
Flex
Flex to Arduino communication
Layers of Communication
• Flex to proxy via an Actionscript library
• Proxy to USB communication
• USB to arduino
Computer                       Arduino




    Flex Code                                       Arduino




Function Calls and
                                                     Code
      Events


                      TCP/IP                USB
     AS3 Glue                   USB Proxy           Firmata
                      Socket                Cable




                Flex to Arduino
Flex Led Demo
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);
AS3Glue Events
• Uses Flex events for digital inputs.
• Listen for changes via event listener
  arduino.addEventListener
  (ArduinoEvent.DIGITAL_DATA,
  onReceiveData);

  public function onReceiveData
  (event:ArduinoEvent):void {
  }
Wireless
Communication
Wireless communication with XBee
modems
XBee Modems
•   Hardware wireless modem
•   Low cost
•   Consume very little power
•   Good range
•   Easy to configure
XBee Modem
XBee Networks
• Point to point
• Point to multipoint
• Mesh
Funnel IO
• Arduino based hardware
• Java server
• Flex library
Funnel Digital Output
Funnel Digital Output
Funnel Digital Output
Setting Digital Output
• Create FIO instance
  var fio:Fio = new Fio([1], Fio.FIRMATA);
• Turn digital output on or off by setting value
  fio.ioModule(1).digitalPin(pin).value = 1;
Funnel Analog Graph
Funnel Analog Graph
Reading Analog Input
• Read analog value same way as digital value
  value = ioModule(1).analogPin(pin).value;
• Event based
  analogPin(pin).addEventListener(
  PinEvent.CHANGE, function);
• Timer based
Issues
•   Debugging can be hard
•   No simulator
•   Memory, power and speed limits
•   Need a little electronic knowledge
Why do this?
• Expose yourself to new ideas and new ways of
  solving problems
• Involves interaction with the real world
• Encourages creativity
• Platform limits improves programming skill
It’s Fun!
Questions?
Ask now, see me after the session or
email me at justin@classsoftware.com
Useful Sites
List of useful hardware of software
sites
Software Sites
• Arduino http://www.arduino.cc for software,
  user forum and playground
• AS3Glue http://code.google.com/p/as3glue/
• Funnel IO http://funnel.cc/
Hardware Sites
• Spark Fun (US) http://www.sparkfun.com/
• Adafruit Industries (US) http://
  www.adafruit.com/
• Electronic Goldmine (US) http://
  www.goldmine-elec.com/
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/

Contenu connexe

Tendances

А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...
it-people
 

Tendances (13)

arduino-1
 arduino-1 arduino-1
arduino-1
 
BLE Talk
BLE TalkBLE Talk
BLE Talk
 
It's game time
It's game timeIt's game time
It's game time
 
Pavel stessin - building and selecting hardware for connected devices
Pavel stessin - building and selecting hardware for connected devicesPavel stessin - building and selecting hardware for connected devices
Pavel stessin - building and selecting hardware for connected devices
 
Got Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOGot Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIO
 
Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the Arduino
 
IP/Wi-Fi Based Robot
IP/Wi-Fi Based RobotIP/Wi-Fi Based Robot
IP/Wi-Fi Based Robot
 
Hackacle Hardware for the Internet of Things (IoT)
Hackacle Hardware for the Internet of Things (IoT)Hackacle Hardware for the Internet of Things (IoT)
Hackacle Hardware for the Internet of Things (IoT)
 
Arduino course
Arduino courseArduino course
Arduino course
 
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUM...
 
MarsBoard - NXP IMX6 Processor
MarsBoard - NXP IMX6 ProcessorMarsBoard - NXP IMX6 Processor
MarsBoard - NXP IMX6 Processor
 
Design challenges in IoT
Design challenges in IoT Design challenges in IoT
Design challenges in IoT
 
Global Azure Bootcamp 2019 - Bandung - Microsoft Azure as Complete Solutions ...
Global Azure Bootcamp 2019 - Bandung - Microsoft Azure as Complete Solutions ...Global Azure Bootcamp 2019 - Bandung - Microsoft Azure as Complete Solutions ...
Global Azure Bootcamp 2019 - Bandung - Microsoft Azure as Complete Solutions ...
 

En vedette

ALA Alex
ALA AlexALA Alex
ALA Alex
abelden
 
Library management system
Library management systemLibrary management system
Library management system
Raaghav Bhatia
 

En vedette (13)

Open Hardware and Libraries
Open Hardware and LibrariesOpen Hardware and Libraries
Open Hardware and Libraries
 
BHL hardware architecture - storage and clusters
BHL hardware architecture - storage and clustersBHL hardware architecture - storage and clusters
BHL hardware architecture - storage and clusters
 
10 Lol Cat Laws Of Web Services For Smaller Underfunded Libraries Il2009
10 Lol Cat Laws Of Web Services For Smaller Underfunded Libraries   Il200910 Lol Cat Laws Of Web Services For Smaller Underfunded Libraries   Il2009
10 Lol Cat Laws Of Web Services For Smaller Underfunded Libraries Il2009
 
Sparklet - Embedded GUI Library
Sparklet - Embedded GUI LibrarySparklet - Embedded GUI Library
Sparklet - Embedded GUI Library
 
Lib labreport final2
Lib labreport final2Lib labreport final2
Lib labreport final2
 
ALA Alex
ALA AlexALA Alex
ALA Alex
 
Fact finding : REFERENCE AND INFORMATION SERVICES IN INFORMATION AGENCIES (I...
Fact finding : REFERENCE AND INFORMATION SERVICES IN INFORMATION AGENCIES  (I...Fact finding : REFERENCE AND INFORMATION SERVICES IN INFORMATION AGENCIES  (I...
Fact finding : REFERENCE AND INFORMATION SERVICES IN INFORMATION AGENCIES (I...
 
Digital library
Digital libraryDigital library
Digital library
 
UiTM Digital Library Services
UiTM Digital Library ServicesUiTM Digital Library Services
UiTM Digital Library Services
 
DIGITAL LIBRARY ARCHITECTURE
DIGITAL LIBRARY ARCHITECTUREDIGITAL LIBRARY ARCHITECTURE
DIGITAL LIBRARY ARCHITECTURE
 
Rfid for library management system printronix
Rfid for library management system printronixRfid for library management system printronix
Rfid for library management system printronix
 
Master Defense Seminar
Master Defense SeminarMaster Defense Seminar
Master Defense Seminar
 
Library management system
Library management systemLibrary management system
Library management system
 

Similaire à Connecting Hardware to Flex (360MAX)

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
elliando dias
 
What is Arduino
What is ArduinoWhat is Arduino
What is Arduino
SKUGme
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
ssusere5db05
 

Similaire à Connecting Hardware to Flex (360MAX) (20)

Edge Of The Web
Edge Of The WebEdge Of The Web
Edge Of The Web
 
arduinoedit.pptx
arduinoedit.pptxarduinoedit.pptx
arduinoedit.pptx
 
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
 
Arduino
ArduinoArduino
Arduino
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
 
Embedded system programming using Arduino microcontroller
Embedded system programming using Arduino microcontrollerEmbedded system programming using Arduino microcontroller
Embedded system programming using Arduino microcontroller
 
What is Arduino
What is ArduinoWhat is Arduino
What is Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino Workshop @ MSA University
Arduino Workshop @ MSA UniversityArduino Workshop @ MSA University
Arduino Workshop @ MSA University
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT Edition
 
Overview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitOverview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer Kit
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
Integrated development environment
Integrated development environmentIntegrated development environment
Integrated development environment
 
4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
 
Introduction to Arduino.pptx
Introduction to Arduino.pptxIntroduction to Arduino.pptx
Introduction to Arduino.pptx
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
Little bits & node.js IOT for beginner
Little bits & node.js IOT for beginnerLittle bits & node.js IOT for beginner
Little bits & node.js IOT for beginner
 

Plus de Justin Mclean

ColdFusion Security and Risk Management
ColdFusion Security and Risk ManagementColdFusion Security and Risk Management
ColdFusion Security and Risk Management
Justin Mclean
 

Plus de Justin Mclean (9)

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
 
ColdFusion Security and Risk Management
ColdFusion Security and Risk ManagementColdFusion Security and Risk Management
ColdFusion Security and Risk Management
 
Connecting RIAs and hardware together
Connecting RIAs and hardware togetherConnecting RIAs and hardware together
Connecting RIAs and hardware together
 
ColdFusion Security and Risk Management
ColdFusion Security and Risk ManagementColdFusion Security and Risk Management
ColdFusion Security and Risk Management
 
Connecting hardware to ColdFusion
Connecting hardware to ColdFusionConnecting hardware to ColdFusion
Connecting hardware to ColdFusion
 
Connecting open source hardware to the web
Connecting open source hardware to the webConnecting open source hardware to the web
Connecting open source hardware to the web
 
Putting your device in a browser or on the web
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 web
 
Creating an Arduino Web Server from scratch hardware and software
Creating an Arduino Web Server from scratch hardware and softwareCreating an Arduino Web Server from scratch hardware and software
Creating an Arduino Web Server from scratch hardware and software
 
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
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

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...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Connecting Hardware to Flex (360MAX)