Adk 101

ADK  101	
           Amir Lazarovich and Uri Shaked

            amirlazarovich@gmail.com / uri@salsa4fun.co.il

Reversim  Summit  2013
What  we  will  cover	
•    What is ADK?
•    Inspirations
•    Live demo
•    Android-ADK simple communication protocol
•    1 minute about resistors and LEDs
•    Setting up the technical environment
•    Lab outline
•    Coding!
What  is  a  Accessory  
Development  Kit?
Inspiration	




h@p://youtu.be/hHVM_5KmHdA
Inspiration	




h@p://youtu.be/Ub7newiu930
Live  Demo
Android-­‐‑ADK  
communication  protocol
Android-­‐‑ADK  
communication  protocol	
         Android Events
         -  onConnected
	
       -  onDisconnected
	
       -  onSendCommand
	
	
         -  onAckReceived
Android-­‐‑ADK  
communication  protocol	
         Android Communication API
         -  sendCommand

         Accepts:
   	
   	
    -  byte command
   	
    -  byte action
         -  byte[] data
Android-­‐‑ADK  
communication  protocol	
         ADK Events
         -  onHandleMessage

         Signature:
         -  byte command
         -  byte action
   	
    -  byte dataLength
   	
   	
    -  byte* data
Resistors	
•  Manage the flow of current through a circuit,
   creating a drop in voltage between two points
Light  Emi@ing  Diodes
Technical  environment	
•  Requirements
   o  Android device running 2.3.4 or higher (not all custom ROMs are supported)
   o  USB cable
   o  Laptop with:
        •  Android SDK (including platform 2.3.3, API level or higher)
        •  Arduino IDE for ADK 2011
        •  Arduino IDE for ADK 2012
        •  Arduino libs –
           copy these libraries to [arduino_installation_folder]/libraries/
        •  Eclipse + Android plugin / Intellij / etc.


•  Lab’s git repository
   o  https://github.com/amirlazarovich/codelab-adk-leds
Lab  Outline	
•  Setting up the environment: Integrated blinking led

•  Getting to know the Android end: Android
  controlled switch on/off for the integrated led

•  Getting to know the ADK end: Controlling an
  external led

•  Customizing both ends: Christmas lights
1 st  milestone  (part  1)    

      Integrated  Blinking  Led	
•  Mission:
      all teams should be able to communicate with their ADKs
•  Steps:
1.    git clone git@github.com:amirlazarovich/codelab-adk-leds.git
2.    Copy the Arduino libraries from [cloned directory]/Arduino/libs to
      [Arduino installation folder]/libraries/
3.    Open the Arduino IDE and select the correct board: tools-board-
      [Arduino mega 2560 or Mega ADK] or [ADK 2012] (depending on
      your ADK model)
4.    Now select the correct usb serial-port: tty.usbserial***
5.    Run the example project: file – examples – basics - blink
1 st  milestone  (part  2)    

      Integrated  Blinking  Led	
•  Mission:
      all teams should be able to communicate with their ADKs
•  Steps:
1.    Open Eclipse/Intellij/etc. and import the projects “adk-manager”
      and “blinking-led”
2.    Make sure the project “blinking-led” import the library project “adk-
      manager” and uses SDK >= 2.3.3
3.    Install the blinking-led project on your Android device
4.    Open the ADK IDE and run the project Adk_201X_blinking_led
2 nd  milestone    

              Android  Switch	
•  Mission:
  Getting familiar with the Android end protocol


•  What you should do:
  Create a new layout with a Switch/Toggle button/etc. that sends
  signals to the ADK device to turn the led on/off
3 rd  milestone    

                  External  Led	
•  Mission:
  Getting familiar with the Arduino end protocol


•  What you should do:
  Build a simple electronic circuit and control it with your ADK
Final  milestone    
              Christmas  lights	
•  Mission:
  Customize both ends and control multiple LEDs


•  What you should do:
  Build any electronic circuit you want that is compiled of LEDs and
  resistors. Control those LEDs using your Android device in any way you
  want (switches/automatic timers/sensors/etc.)
Thank  you	
Our sponsors:
See  you  at  our  next  Lab
1 of 21

Recommended

GCC 2-19-16 by
GCC 2-19-16GCC 2-19-16
GCC 2-19-16Kayla Leung
687 views14 slides
GCC 2-12-16 by
GCC 2-12-16GCC 2-12-16
GCC 2-12-16Kayla Leung
597 views14 slides
Hacktime for adk by
Hacktime for adkHacktime for adk
Hacktime for adkSeongJae Park
973 views52 slides
Android Open Accessory Protocol - Turn Your Linux machine as ADK by
Android Open Accessory Protocol - Turn Your Linux machine as ADKAndroid Open Accessory Protocol - Turn Your Linux machine as ADK
Android Open Accessory Protocol - Turn Your Linux machine as ADKRajesh Sola
2.9K views20 slides
Controlling and monitoring external embedded device using android frameworks ... by
Controlling and monitoring external embedded device using android frameworks ...Controlling and monitoring external embedded device using android frameworks ...
Controlling and monitoring external embedded device using android frameworks ...Dhruvilkumar patel
2.9K views24 slides
Go Green - Save Power by
Go Green - Save PowerGo Green - Save Power
Go Green - Save PowerRajesh Sola
469 views12 slides

More Related Content

Similar to Adk 101

Weather monitoring System Using STM32 by
Weather monitoring System Using STM32Weather monitoring System Using STM32
Weather monitoring System Using STM32Hitesh Kumar Nath
29 views137 slides
aoa-adk-osidays-rajeshsola by
aoa-adk-osidays-rajeshsolaaoa-adk-osidays-rajeshsola
aoa-adk-osidays-rajeshsolaRajesh Sola
388 views20 slides
Interfacing of a LED display with laptop using Arduino by
Interfacing of a LED display with laptop using ArduinoInterfacing of a LED display with laptop using Arduino
Interfacing of a LED display with laptop using ArduinoDiksha Prakash
1.5K views33 slides
STM -32 by
STM -32STM -32
STM -32SeoTechnoscripts
10 views26 slides
learning STM -32 by
learning STM -32 learning STM -32
learning STM -32 SeoTechnoscripts
5 views26 slides
From Arduino to ADK by
From Arduino to ADKFrom Arduino to ADK
From Arduino to ADKCoLab Athens
1K views16 slides

Similar to Adk 101(20)

aoa-adk-osidays-rajeshsola by Rajesh Sola
aoa-adk-osidays-rajeshsolaaoa-adk-osidays-rajeshsola
aoa-adk-osidays-rajeshsola
Rajesh Sola388 views
Interfacing of a LED display with laptop using Arduino by Diksha Prakash
Interfacing of a LED display with laptop using ArduinoInterfacing of a LED display with laptop using Arduino
Interfacing of a LED display with laptop using Arduino
Diksha Prakash1.5K views
Track 5 session 5 - st dev con 2016 - stm32 hands on seminar - cloud connec... by ST_World
Track 5   session 5 - st dev con 2016 - stm32 hands on seminar - cloud connec...Track 5   session 5 - st dev con 2016 - stm32 hands on seminar - cloud connec...
Track 5 session 5 - st dev con 2016 - stm32 hands on seminar - cloud connec...
ST_World 3.3K views
Smartphone++ by mharkus
Smartphone++Smartphone++
Smartphone++
mharkus3.3K views
Enhancing and modifying_the_core_android_os by Arnav Gupta
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
Arnav Gupta1.5K views
Android Native Development Kit by Peter R. Egli
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
Peter R. Egli2.8K views
Getting started with Intel IoT Developer Kit by Sulamita Garcia
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
Sulamita Garcia17.8K views
Lab Handson: Power your Creations with Intel Edison! by Codemotion
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion2K views
Enhancing and modifying_the_core_android_os by Arnav Gupta
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
Arnav Gupta717 views
Overview of the Intel® Internet of Things Developer Kit by Intel® Software
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
Intel® Software2K views
Getting Started with the NodeMCU- NodeMCU Programming (By Akshet Patel) by AkshetPatel
Getting Started with the NodeMCU- NodeMCU Programming (By Akshet Patel)Getting Started with the NodeMCU- NodeMCU Programming (By Akshet Patel)
Getting Started with the NodeMCU- NodeMCU Programming (By Akshet Patel)
AkshetPatel76 views

Recently uploaded

Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023BookNet Canada
44 views19 slides
Future of Indian ConsumerTech by
Future of Indian ConsumerTechFuture of Indian ConsumerTech
Future of Indian ConsumerTechKapil Khandelwal (KK)
36 views68 slides
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...ShapeBlue
162 views25 slides
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...ShapeBlue
120 views17 slides
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
224 views7 slides
The Power of Heat Decarbonisation Plans in the Built Environment by
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built EnvironmentIES VE
84 views20 slides

Recently uploaded(20)

Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada44 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue162 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue120 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue224 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE84 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue265 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue129 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue164 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue199 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue208 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue225 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue207 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc176 views
LLMs in Production: Tooling, Process, and Team Structure by Aggregage
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
Aggregage57 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 views

Adk 101

  • 1. ADK  101 Amir Lazarovich and Uri Shaked amirlazarovich@gmail.com / uri@salsa4fun.co.il Reversim  Summit  2013
  • 2. What  we  will  cover •  What is ADK? •  Inspirations •  Live demo •  Android-ADK simple communication protocol •  1 minute about resistors and LEDs •  Setting up the technical environment •  Lab outline •  Coding!
  • 3. What  is  a  Accessory   Development  Kit?
  • 8. Android-­‐‑ADK   communication  protocol Android Events -  onConnected -  onDisconnected -  onSendCommand -  onAckReceived
  • 9. Android-­‐‑ADK   communication  protocol Android Communication API -  sendCommand Accepts: -  byte command -  byte action -  byte[] data
  • 10. Android-­‐‑ADK   communication  protocol ADK Events -  onHandleMessage Signature: -  byte command -  byte action -  byte dataLength -  byte* data
  • 11. Resistors •  Manage the flow of current through a circuit, creating a drop in voltage between two points
  • 13. Technical  environment •  Requirements o  Android device running 2.3.4 or higher (not all custom ROMs are supported) o  USB cable o  Laptop with: •  Android SDK (including platform 2.3.3, API level or higher) •  Arduino IDE for ADK 2011 •  Arduino IDE for ADK 2012 •  Arduino libs – copy these libraries to [arduino_installation_folder]/libraries/ •  Eclipse + Android plugin / Intellij / etc. •  Lab’s git repository o  https://github.com/amirlazarovich/codelab-adk-leds
  • 14. Lab  Outline •  Setting up the environment: Integrated blinking led •  Getting to know the Android end: Android controlled switch on/off for the integrated led •  Getting to know the ADK end: Controlling an external led •  Customizing both ends: Christmas lights
  • 15. 1 st  milestone  (part  1)     Integrated  Blinking  Led •  Mission: all teams should be able to communicate with their ADKs •  Steps: 1.  git clone git@github.com:amirlazarovich/codelab-adk-leds.git 2.  Copy the Arduino libraries from [cloned directory]/Arduino/libs to [Arduino installation folder]/libraries/ 3.  Open the Arduino IDE and select the correct board: tools-board- [Arduino mega 2560 or Mega ADK] or [ADK 2012] (depending on your ADK model) 4.  Now select the correct usb serial-port: tty.usbserial*** 5.  Run the example project: file – examples – basics - blink
  • 16. 1 st  milestone  (part  2)     Integrated  Blinking  Led •  Mission: all teams should be able to communicate with their ADKs •  Steps: 1.  Open Eclipse/Intellij/etc. and import the projects “adk-manager” and “blinking-led” 2.  Make sure the project “blinking-led” import the library project “adk- manager” and uses SDK >= 2.3.3 3.  Install the blinking-led project on your Android device 4.  Open the ADK IDE and run the project Adk_201X_blinking_led
  • 17. 2 nd  milestone     Android  Switch •  Mission: Getting familiar with the Android end protocol •  What you should do: Create a new layout with a Switch/Toggle button/etc. that sends signals to the ADK device to turn the led on/off
  • 18. 3 rd  milestone     External  Led •  Mission: Getting familiar with the Arduino end protocol •  What you should do: Build a simple electronic circuit and control it with your ADK
  • 19. Final  milestone     Christmas  lights •  Mission: Customize both ends and control multiple LEDs •  What you should do: Build any electronic circuit you want that is compiled of LEDs and resistors. Control those LEDs using your Android device in any way you want (switches/automatic timers/sensors/etc.)
  • 21. See  you  at  our  next  Lab