Your SlideShare is downloading. ×
0
android                arduino          and             mixed with                                   breakout.js          ...
Who am I?• Embedded System Software Engineer• Android & Hybrid Application Developer• PhoneGap Book Author• twitter : @mus...
Today DemoTurn LED on/off     ?Get Button status
Way 1. using Android ADK                     USB host• Pros : The simplest way• Cons : Wired connection
Way 2. using Amarino                       Bluetooth• Pros : Wireless connection• Cons : Bluetooth shield needed
Way 3. breakout.js             USB              to            Serial                                  WiFi• Pros : Wireles...
Arduino         digital                      • Open Hardware usbserial                      • 13 digital pin, 6 analog pin...
breakout.js      Physical Input                                     WebApp     Physical Output                            ...
PhoneGap             & PhoneGap Plugin• PhoneGap is HTML5 app platform.• WebView in Android is not support WebSocket.• Pho...
Software       Firmata          Breakout.js Server Breakout.js Client-C                     - Java                 - Javas...
Breakout Javascript API• Initialize<script type="text/javascript" src="Breakout.js"></script>var IOBoard = BO.IOBoard;var ...
Breakout Javascript API• LED// led = new LED(arduino, arduino.getDigitalPin(11));function turnLedOn(evt) {  led.on();}func...
Demo
Many Combinations available   Firmata          Breakout.js Server   Breakout.js Client                                    ...
Reference Sites•   Breakout.js : http://breakoutjs.com/•   PhoneGap : http://phonegap.com/•   PhoneGap Plugin : https://gi...
Thanks@musart
Upcoming SlideShare
Loading in...5
×

Android and Arduio mixed with Breakout js

18,686

Published on

I made this presentation for DFX Korea 2012.
I will present this in emerging session.
For more information of the event, please go to https://sites.google.com/site/devfestxkorea/program

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

No Downloads
Views
Total Views
18,686
On Slideshare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
104
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript of "Android and Arduio mixed with Breakout js"

    1. 1. android arduino and mixed with breakout.js @musart
    2. 2. Who am I?• Embedded System Software Engineer• Android & Hybrid Application Developer• PhoneGap Book Author• twitter : @musart
    3. 3. Today DemoTurn LED on/off ?Get Button status
    4. 4. Way 1. using Android ADK USB host• Pros : The simplest way• Cons : Wired connection
    5. 5. Way 2. using Amarino Bluetooth• Pros : Wireless connection• Cons : Bluetooth shield needed
    6. 6. Way 3. breakout.js USB to Serial WiFi• Pros : Wireless connection, No more shield• Cons : Server PC needed
    7. 7. Arduino digital • Open Hardware usbserial • 13 digital pin, 6 analog pin • It works standalone withpower Power analog • Sketch Tool
    8. 8. breakout.js Physical Input WebApp Physical Output MobileApp• Connect physical I/O to Web based on Javascript• Using WebSocket
    9. 9. PhoneGap & PhoneGap Plugin• PhoneGap is HTML5 app platform.• WebView in Android is not support WebSocket.• PhoneGap also uses WebView.• WebSocket is able to be implemented as PhoneGap plugin.
    10. 10. Software Firmata Breakout.js Server Breakout.js Client-C - Java - Javascript- use Standard Firmata - webbit, rxtx library - jQuery libraryvoid setup() bridge = new SerialBridge ...{ (netPort, this, webRoot, var IOBoard = BO.IOBoard; ... isMultiClientEnabled); var IOBoardEvent = Firmata. bridge.begin(serialPort, BO.IOBoardEvent; attach(ANALOG_MESSAGE, 57600); var LED = BO.io.LED; analogWriteCallback); connectBtn. var Button = BO.io.Button; Firmata. setText("Disconnect"); var ButtonEvent = attach(DIGITAL_MESSAGE, connectBtn. BO.io.ButtonEvent; digitalWriteCallback); setActionCommand ... ("disconnect"); var arduino = new Firmata.begin(57600); if (timer != null) { IOBoard("192.168.1.2", systemResetCallback(); stopPortListTimer(); 8890);} } var led;
    11. 11. Breakout Javascript API• Initialize<script type="text/javascript" src="Breakout.js"></script>var IOBoard = BO.IOBoard;var LED = BO.io.LED;var Button = BO.io.Button;var arduino = new IOBoard("192.168.1.2", 8890);var led;arduino.addEventListener(IOBoardEvent.READY, onReady);function onReady(event) { arduino.removeEventListener(IOBoardEvent.READY, onReady); led = new LED(arduino, arduino.getDigitalPin(11)); var button = new Button(arduino, arduino.getDigitalPin(2)); button.addEventListener(ButtonEvent.PRESS, onPress); button.addEventListener(ButtonEvent.RELEASE, onRelease);}
    12. 12. Breakout Javascript API• LED// led = new LED(arduino, arduino.getDigitalPin(11));function turnLedOn(evt) { led.on();}function turnLedOff(evt) { led.off();}• Button// var button = new Button(arduino, arduino.getDigitalPin(2));// button.addEventListener(ButtonEvent.PRESS, onPress);// button.addEventListener(ButtonEvent.RELEASE, onRelease);function onPress(evt) { var btn = evt.target; $(#state).html("Button "+ btn.pinNumber +" state: Pressed");}function onRelease(evt) { var btn = evt.target; $(#state).html("Button "+ btn.pinNumber +" state:Released");}
    13. 13. Demo
    14. 14. Many Combinations available Firmata Breakout.js Server Breakout.js Client PhoneGap App Web App, Hybrid App Arduino Nano Raspberry PiArduino Mega 2560 Baegle Board
    15. 15. Reference Sites• Breakout.js : http://breakoutjs.com/• PhoneGap : http://phonegap.com/• PhoneGap Plugin : https://github.com/anismiles/websocket- android-phonegap• Firmata : http://firmata.org/wiki/Main_Page• Amernio : http://www.amarino-toolkit.net/• Android ADK : http://developer.android.com/guide/topics/ usb/adk.html• Funnel : http://funnel.cc/
    16. 16. Thanks@musart
    1. A particular slide catching your eye?

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

    ×