SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
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

Más contenido relacionado

Similar a Adk 101

Weather monitoring System Using STM32
Weather monitoring System Using STM32Weather monitoring System Using STM32
Weather monitoring System Using STM32Hitesh Kumar Nath
 
aoa-adk-osidays-rajeshsola
aoa-adk-osidays-rajeshsolaaoa-adk-osidays-rajeshsola
aoa-adk-osidays-rajeshsolaRajesh Sola
 
Interfacing of a LED display with laptop using Arduino
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
 
From Arduino to ADK
From Arduino to ADKFrom Arduino to ADK
From Arduino to ADKCoLab Athens
 
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...
Track 5 session 5 - st dev con 2016 - stm32 hands on seminar - cloud connec...ST_World
 
Smartphone++
Smartphone++Smartphone++
Smartphone++mharkus
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osArnav Gupta
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development KitPeter R. Egli
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osArnav Gupta
 
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 KitIntel® Software
 
technical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptxtechnical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptxMostafaKhaled78
 
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)
Getting Started with the NodeMCU- NodeMCU Programming (By Akshet Patel)AkshetPatel
 

Similar a Adk 101 (20)

Weather monitoring System Using STM32
Weather monitoring System Using STM32Weather monitoring System Using STM32
Weather monitoring System Using STM32
 
aoa-adk-osidays-rajeshsola
aoa-adk-osidays-rajeshsolaaoa-adk-osidays-rajeshsola
aoa-adk-osidays-rajeshsola
 
Interfacing of a LED display with laptop using Arduino
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
 
STM -32
STM -32STM -32
STM -32
 
learning STM -32
learning STM -32 learning STM -32
learning STM -32
 
From Arduino to ADK
From Arduino to ADKFrom Arduino to ADK
From Arduino to ADK
 
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...
Track 5 session 5 - st dev con 2016 - stm32 hands on seminar - cloud connec...
 
Smartphone++
Smartphone++Smartphone++
Smartphone++
 
Android Lollipop
Android LollipopAndroid Lollipop
Android Lollipop
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
 
B1_25Jan21.pptx
B1_25Jan21.pptxB1_25Jan21.pptx
B1_25Jan21.pptx
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
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
 
Road to RIoT 2017 Medan
Road to RIoT 2017 MedanRoad to RIoT 2017 Medan
Road to RIoT 2017 Medan
 
technical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptxtechnical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptx
 
Led cube presentation
Led cube presentationLed cube presentation
Led cube presentation
 
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)
Getting Started with the NodeMCU- NodeMCU Programming (By Akshet Patel)
 

Último

Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 

Último (20)

Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 

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