SlideShare a Scribd company logo
Smartphone++
Marc Lester S. Tan
Mobile Applications Developer, SAP

GDG Devfest Kota Kinabalu 2013
Agenda
●  Overview of Arduino
●  Google ADK
●  Uses of ADK and Demo
Overview of Arduino
Overview of Arduino
• 

Open-source electronics prototyping
platform.

• 

Intended for Artists, Designers and
Hobbyists.

• 

Arduino Programming Language based
on Wiring.

• 

Arduino IDE based on Processing

source: http://www.arduino.cc
Overview of Arduino
• 

Inexpensive

• 

Cross-platform

• 

Simple and clear programming environment.

• 

Open-source software and hardware
Arduino Shields
Shields are boards that can be plugged on top
of the Arduino PCB extending its capabilities.

• 

SD Card Shield

• 

USB Host Shield

• 

Ethernet Shield
source:
http://blog.protoneer.co.nz/
Arduino IDE
• 

Java

• 

Based on Processing IDE
(processing.org)

• 

Write and upload code to Arduino
board
Arduino Sketch
• 

setup()
o  called once
o  setup pin modes
o  library initialization

• 

loop()
o  called over the over again
o  heart of every sketches
Sample Sketch
int inputPin = 12;

// let pin 12 be our input pin

int outputPin = 11;

// let pin 11 be our ouput pin

void setup(){
pinMode(outputPin, OUTPUT);

// setup output pin to be an OUTPUT

pinMode(inputPin, INPUT);

// setup input pin to be our INPUT

}
void loop(){
int inputVal = digitalRead(inputPin);
digitalWrite(outputPin, inputVal);
delay(100);
}

// write the value of input pin to output
// wait for 100ms
// before looping again.
Google ADK
USB on Android
Host Mode

Power

Data Transfer

Accessory Mode

Power

Data Transfer
Google ADK
●  Reference implementation for
hardware manufacturers and
hobbyists.
●  It uses Android Open Accessory
Protocol over USB or Bluetooth
●  The hardware is based on
Arduino Mega.
●  Two versions: ADK 2011 and
ADK 2012

source: http://www.engadget.com/gallery/googles-arduino-based-adk-hands-on-atgoogle-i-o-2011/
Hello, Physical World
• 

Design and create the hardware or
circuit.

• 

Write the firmware for your
Arduino.

• 

Create an Android application that
can talk to your firmware.

source: http://www.youtube.com/watch?v=gcP7KwIENGw
Design and Create the Hardware
• 

Use Fritzing to design your
breadboard, schematic diagram
and bill of materials.

• 

Get it from http://fritzing.org/
Write the Firmware
if (acc.isConnected()) {
int len = acc.read(msg, sizeof(msg), 1);
if(len > 0){
Serial.println(len);
if(msg[0] == 0x1){
digitalWrite(13, HIGH);
}else{
digitalWrite(13, LOW);
}
}
}else{
digitalWrite(13, LOW);
}
Create the Android Application
● 

USBManager - available since 3.1 but also available for 2.3.4 using Google API 10
○ 

● 

Not all devices support accessory mode

Android Manifest Requirements:
Declare:
<uses-feature android:name="android.hardware.usb.accessory" />
If using Add-on:
<application….>
<uses-library android:name="com.android.future.usb.accessory" />
Create the Android Application
Android Manifest Requirements:
<activity ...>
...
<intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" /
>
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="@xml/accessory_filter" />
</activity>
Create the Android Application
res/xml/accessory_filter.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<usb-accessory manufacturer="Marc Tan" model="Motor Control" version="1.0" />
</resources>
Create the Android Application
onCreate()...
mUsbManager = UsbManager.getInstance(this);
onResume()...
UsbAccessory[] accessories = mUsbManager.getAccessoryList();
UsbAccessory accessory = accessories[0]);
if (mUsbManager.hasPermission(accessory)) {
openAccessory(accessory);
}
Create the Android Application
protected void openAccessory(UsbAccessory accessory) {
fileDescriptor = mUsbManager.openAccessory(accessory);
FileDescriptor fd = fileDescriptor.getFileDescriptor();
input = new FileInputStream(fd);
output = new FileOutputStream(fd);
}
onDestroy()...
output.write(0); // optional
fileDescriptor.close();
Uses of ADK and Demo
Uses of ADK
Audio Docking Station
Uses of ADK
Exercise Machines
Uses of ADK
Weather Stations
Uses of ADK
Home Automation
Demo: Sonar
Demo: Motor Control
Demo: Android as USB Host
Resources
Android ADK
a.android.com

Arduino and Electronics, Others
arduino.cc
tronixstuff.com
hackaday.com
My Blog and Github
marctan.com
github.com/mharkus
Quadcopter
bitcraze.se
Thank you
Questions?

More Related Content

What's hot

Development, debug and deploy hardware/software solutions based on Android an...
Development, debug and deploy hardware/software solutions based on Android an...Development, debug and deploy hardware/software solutions based on Android an...
Development, debug and deploy hardware/software solutions based on Android an...
Илья Родин
 
Making arduino-talk-with-android-using-amarino
Making arduino-talk-with-android-using-amarinoMaking arduino-talk-with-android-using-amarino
Making arduino-talk-with-android-using-amarino
Sudar Muthu
 
Leveraging the Android Open Accessory Protocol
Leveraging the Android Open Accessory ProtocolLeveraging the Android Open Accessory Protocol
Leveraging the Android Open Accessory Protocol
Gary Bisson
 
Open hack 2011-hardware-hacks
Open hack 2011-hardware-hacksOpen hack 2011-hardware-hacks
Open hack 2011-hardware-hacks
Sudar Muthu
 
Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)
santiagojbt
 
How to build your own Android devices @ Google Developer Day 2012
How to build your own Android devices @ Google Developer Day 2012How to build your own Android devices @ Google Developer Day 2012
How to build your own Android devices @ Google Developer Day 2012
Toriningen,Inc.
 
Arduino Anatomy
Arduino AnatomyArduino Anatomy
Arduino Anatomy
Alaa Mahran
 
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT CoreHands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
Andri Yadi
 
Introduction to Internet of Things Hardware
Introduction to Internet of Things HardwareIntroduction to Internet of Things Hardware
Introduction to Internet of Things Hardware
Daniel Eichhorn
 
Introduction to Arduino Programming
Introduction to Arduino ProgrammingIntroduction to Arduino Programming
Introduction to Arduino Programming
James Lewis
 
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.jsRaspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
Andri Yadi
 
Confusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware Kerfuffle
Omer Kilic
 
iPad Music Production iO Dock Product Overview
iPad Music Production iO Dock Product OverviewiPad Music Production iO Dock Product Overview
iPad Music Production iO Dock Product Overview
AlesisUS
 
INTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCING
INTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCINGINTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCING
INTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCING
Devyani Chaudhari
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
Vijay Vishwakarma
 
GDG Dev Fest - Develop with Firebase and IoT
GDG Dev Fest - Develop with Firebase and IoTGDG Dev Fest - Develop with Firebase and IoT
GDG Dev Fest - Develop with Firebase and IoT
Andri Yadi
 
OpenVR at Arduino Day Malmö
OpenVR at Arduino Day MalmöOpenVR at Arduino Day Malmö
OpenVR at Arduino Day Malmö
Ahmet YILDIRIM
 
Building Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & AzureBuilding Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & Azure
Nick Landry
 
RD_M1_S
RD_M1_SRD_M1_S
RD_M1_S
Adam Dalton
 
Internet of things and arduino
Internet of things and arduinoInternet of things and arduino
Internet of things and arduino
Christophe Marchal
 

What's hot (20)

Development, debug and deploy hardware/software solutions based on Android an...
Development, debug and deploy hardware/software solutions based on Android an...Development, debug and deploy hardware/software solutions based on Android an...
Development, debug and deploy hardware/software solutions based on Android an...
 
Making arduino-talk-with-android-using-amarino
Making arduino-talk-with-android-using-amarinoMaking arduino-talk-with-android-using-amarino
Making arduino-talk-with-android-using-amarino
 
Leveraging the Android Open Accessory Protocol
Leveraging the Android Open Accessory ProtocolLeveraging the Android Open Accessory Protocol
Leveraging the Android Open Accessory Protocol
 
Open hack 2011-hardware-hacks
Open hack 2011-hardware-hacksOpen hack 2011-hardware-hacks
Open hack 2011-hardware-hacks
 
Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)
 
How to build your own Android devices @ Google Developer Day 2012
How to build your own Android devices @ Google Developer Day 2012How to build your own Android devices @ Google Developer Day 2012
How to build your own Android devices @ Google Developer Day 2012
 
Arduino Anatomy
Arduino AnatomyArduino Anatomy
Arduino Anatomy
 
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT CoreHands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
Hands-on Labs: Raspberry Pi 2 + Windows 10 IoT Core
 
Introduction to Internet of Things Hardware
Introduction to Internet of Things HardwareIntroduction to Internet of Things Hardware
Introduction to Internet of Things Hardware
 
Introduction to Arduino Programming
Introduction to Arduino ProgrammingIntroduction to Arduino Programming
Introduction to Arduino Programming
 
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.jsRaspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
 
Confusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware Kerfuffle
 
iPad Music Production iO Dock Product Overview
iPad Music Production iO Dock Product OverviewiPad Music Production iO Dock Product Overview
iPad Music Production iO Dock Product Overview
 
INTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCING
INTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCINGINTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCING
INTRODUCTION TO ARDUINO & RASPBERRY, SENSOR AND TEMPERATURE INTERAFCING
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
GDG Dev Fest - Develop with Firebase and IoT
GDG Dev Fest - Develop with Firebase and IoTGDG Dev Fest - Develop with Firebase and IoT
GDG Dev Fest - Develop with Firebase and IoT
 
OpenVR at Arduino Day Malmö
OpenVR at Arduino Day MalmöOpenVR at Arduino Day Malmö
OpenVR at Arduino Day Malmö
 
Building Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & AzureBuilding Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & Azure
 
RD_M1_S
RD_M1_SRD_M1_S
RD_M1_S
 
Internet of things and arduino
Internet of things and arduinoInternet of things and arduino
Internet of things and arduino
 

Viewers also liked

Casada Carmem
Casada CarmemCasada Carmem
Casada Carmem
Capacete
 
Data transmission through Audio Jack on iOS
Data transmission through Audio Jack on iOSData transmission through Audio Jack on iOS
Data transmission through Audio Jack on iOS
Shipeng Xu
 
イチからはじめるADK北海道支部勉強会発表資料
イチからはじめるADK北海道支部勉強会発表資料イチからはじめるADK北海道支部勉強会発表資料
イチからはじめるADK北海道支部勉強会発表資料Kenichi Yoshida
 
Android アプリ開発における Gradle ビルドシステム
Android アプリ開発における Gradle ビルドシステムAndroid アプリ開発における Gradle ビルドシステム
Android アプリ開発における Gradle ビルドシステム
Yu Nobuoka
 
Android のusb support
Android のusb supportAndroid のusb support
Android のusb support
magoroku Yamamoto
 
Presentacion ip
Presentacion ipPresentacion ip
Presentacion ip
Pablo López
 
Android Open Accessory APIs
Android Open Accessory APIsAndroid Open Accessory APIs
Android Open Accessory APIs
Pearl Chen
 
Navigation Using Audio Jack
Navigation Using Audio JackNavigation Using Audio Jack
Navigation Using Audio Jack
Jayanta Ghoshal
 

Viewers also liked (9)

Casada Carmem
Casada CarmemCasada Carmem
Casada Carmem
 
Data transmission through Audio Jack on iOS
Data transmission through Audio Jack on iOSData transmission through Audio Jack on iOS
Data transmission through Audio Jack on iOS
 
イチからはじめるADK北海道支部勉強会発表資料
イチからはじめるADK北海道支部勉強会発表資料イチからはじめるADK北海道支部勉強会発表資料
イチからはじめるADK北海道支部勉強会発表資料
 
Android アプリ開発における Gradle ビルドシステム
Android アプリ開発における Gradle ビルドシステムAndroid アプリ開発における Gradle ビルドシステム
Android アプリ開発における Gradle ビルドシステム
 
Android のusb support
Android のusb supportAndroid のusb support
Android のusb support
 
Presentacion ip
Presentacion ipPresentacion ip
Presentacion ip
 
Android Open Accessory APIs
Android Open Accessory APIsAndroid Open Accessory APIs
Android Open Accessory APIs
 
Navigation Using Audio Jack
Navigation Using Audio JackNavigation Using Audio Jack
Navigation Using Audio Jack
 
Android usbの基本
Android usbの基本Android usbの基本
Android usbの基本
 

Similar to Smartphone++

Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
FTS seminar
 
An introduction to Arduino
An introduction to ArduinoAn introduction to Arduino
An introduction to Arduino
Emertxe Information Technologies Pvt Ltd
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with android
firenze-gtug
 
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
 
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
Sulamita Garcia
 
Up and running with Arduino
Up and running with Arduino Up and running with Arduino
Up and running with Arduino
KUET
 
Embedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptxEmbedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptx
aartis110
 
Arduino Programming Software Development
Arduino Programming Software DevelopmentArduino Programming Software Development
Arduino Programming Software Development
Sanjay Kumar
 
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
Intel® Software
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
Laurence HR
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of Arduino
Abhimanyu Sangale
 
EclipseCon NA 2015 - Arduino designer : the making of!
EclipseCon NA 2015 - Arduino designer : the making of!EclipseCon NA 2015 - Arduino designer : the making of!
EclipseCon NA 2015 - Arduino designer : the making of!
melbats
 
Arduino
ArduinoArduino
Report on arduino
Report on arduinoReport on arduino
Report on arduino
Ravi Phadtare
 
4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf
RynefelElopre2
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Richard Rixham
 
IoT and developer chances
IoT and developer chancesIoT and developer chances
IoT and developer chances
Chau Thanh
 
Cesec2015 - Arduino Designer
Cesec2015 - Arduino DesignerCesec2015 - Arduino Designer
Cesec2015 - Arduino Designer
melbats
 
Introduction to Arduino.pptx
Introduction to Arduino.pptxIntroduction to Arduino.pptx
Introduction to Arduino.pptx
Akshat Bijronia
 
Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)
manditalaskar123
 

Similar to Smartphone++ (20)

Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
 
An introduction to Arduino
An introduction to ArduinoAn introduction to Arduino
An introduction to Arduino
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with android
 
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!
 
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
 
Up and running with Arduino
Up and running with Arduino Up and running with Arduino
Up and running with Arduino
 
Embedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptxEmbedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptx
 
Arduino Programming Software Development
Arduino Programming Software DevelopmentArduino Programming Software Development
Arduino Programming Software Development
 
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
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of Arduino
 
EclipseCon NA 2015 - Arduino designer : the making of!
EclipseCon NA 2015 - Arduino designer : the making of!EclipseCon NA 2015 - Arduino designer : the making of!
EclipseCon NA 2015 - Arduino designer : the making of!
 
Arduino
ArduinoArduino
Arduino
 
Report on arduino
Report on arduinoReport on arduino
Report on arduino
 
4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
IoT and developer chances
IoT and developer chancesIoT and developer chances
IoT and developer chances
 
Cesec2015 - Arduino Designer
Cesec2015 - Arduino DesignerCesec2015 - Arduino Designer
Cesec2015 - Arduino Designer
 
Introduction to Arduino.pptx
Introduction to Arduino.pptxIntroduction to Arduino.pptx
Introduction to Arduino.pptx
 
Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)Interoperability in Internet of Things (IOT)
Interoperability in Internet of Things (IOT)
 

Recently uploaded

Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 

Recently uploaded (20)

Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 

Smartphone++

  • 1. Smartphone++ Marc Lester S. Tan Mobile Applications Developer, SAP GDG Devfest Kota Kinabalu 2013
  • 2. Agenda ●  Overview of Arduino ●  Google ADK ●  Uses of ADK and Demo
  • 4. Overview of Arduino •  Open-source electronics prototyping platform. •  Intended for Artists, Designers and Hobbyists. •  Arduino Programming Language based on Wiring. •  Arduino IDE based on Processing source: http://www.arduino.cc
  • 5. Overview of Arduino •  Inexpensive •  Cross-platform •  Simple and clear programming environment. •  Open-source software and hardware
  • 6. Arduino Shields Shields are boards that can be plugged on top of the Arduino PCB extending its capabilities. •  SD Card Shield •  USB Host Shield •  Ethernet Shield source: http://blog.protoneer.co.nz/
  • 7. Arduino IDE •  Java •  Based on Processing IDE (processing.org) •  Write and upload code to Arduino board
  • 8. Arduino Sketch •  setup() o  called once o  setup pin modes o  library initialization •  loop() o  called over the over again o  heart of every sketches
  • 9. Sample Sketch int inputPin = 12; // let pin 12 be our input pin int outputPin = 11; // let pin 11 be our ouput pin void setup(){ pinMode(outputPin, OUTPUT); // setup output pin to be an OUTPUT pinMode(inputPin, INPUT); // setup input pin to be our INPUT } void loop(){ int inputVal = digitalRead(inputPin); digitalWrite(outputPin, inputVal); delay(100); } // write the value of input pin to output // wait for 100ms // before looping again.
  • 11. USB on Android Host Mode Power Data Transfer Accessory Mode Power Data Transfer
  • 12. Google ADK ●  Reference implementation for hardware manufacturers and hobbyists. ●  It uses Android Open Accessory Protocol over USB or Bluetooth ●  The hardware is based on Arduino Mega. ●  Two versions: ADK 2011 and ADK 2012 source: http://www.engadget.com/gallery/googles-arduino-based-adk-hands-on-atgoogle-i-o-2011/
  • 13. Hello, Physical World •  Design and create the hardware or circuit. •  Write the firmware for your Arduino. •  Create an Android application that can talk to your firmware. source: http://www.youtube.com/watch?v=gcP7KwIENGw
  • 14. Design and Create the Hardware •  Use Fritzing to design your breadboard, schematic diagram and bill of materials. •  Get it from http://fritzing.org/
  • 15. Write the Firmware if (acc.isConnected()) { int len = acc.read(msg, sizeof(msg), 1); if(len > 0){ Serial.println(len); if(msg[0] == 0x1){ digitalWrite(13, HIGH); }else{ digitalWrite(13, LOW); } } }else{ digitalWrite(13, LOW); }
  • 16. Create the Android Application ●  USBManager - available since 3.1 but also available for 2.3.4 using Google API 10 ○  ●  Not all devices support accessory mode Android Manifest Requirements: Declare: <uses-feature android:name="android.hardware.usb.accessory" /> If using Add-on: <application….> <uses-library android:name="com.android.future.usb.accessory" />
  • 17. Create the Android Application Android Manifest Requirements: <activity ...> ... <intent-filter> <action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" / > </intent-filter> <meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" android:resource="@xml/accessory_filter" /> </activity>
  • 18. Create the Android Application res/xml/accessory_filter.xml <?xml version="1.0" encoding="utf-8"?> <resources> <usb-accessory manufacturer="Marc Tan" model="Motor Control" version="1.0" /> </resources>
  • 19. Create the Android Application onCreate()... mUsbManager = UsbManager.getInstance(this); onResume()... UsbAccessory[] accessories = mUsbManager.getAccessoryList(); UsbAccessory accessory = accessories[0]); if (mUsbManager.hasPermission(accessory)) { openAccessory(accessory); }
  • 20. Create the Android Application protected void openAccessory(UsbAccessory accessory) { fileDescriptor = mUsbManager.openAccessory(accessory); FileDescriptor fd = fileDescriptor.getFileDescriptor(); input = new FileInputStream(fd); output = new FileOutputStream(fd); } onDestroy()... output.write(0); // optional fileDescriptor.close();
  • 21. Uses of ADK and Demo
  • 22. Uses of ADK Audio Docking Station
  • 25. Uses of ADK Home Automation
  • 28. Demo: Android as USB Host
  • 29. Resources Android ADK a.android.com Arduino and Electronics, Others arduino.cc tronixstuff.com hackaday.com My Blog and Github marctan.com github.com/mharkus Quadcopter bitcraze.se