Posts

Showing posts with the label ADK

Quality of Google ADK 2012 Code

Image
We all want to have more Android automation in our homes. XDA Elite Recognized Developer AdamOutler set out to do just that and spent around 40 hours attempting to reduce and rewrite the code driving the ADK2012 into something which would be more moldable and bendable. He failed and he explains why in his rant which he calls the ADK2012 "The Worst Code Ever". So if you've ever wanted to work with Google Accessory Development Kit makes ure to check out this video. This will give you a little insight as to what trials and tribulations you may have with this resource. Before you engage in a head desk collision session, check out what Adam has to say.

Android code sending command to Arduino Due to turn LED On/Off

Image
It's the coding in Android side to send command to Arduino Due to control LED On/Off. Modify AndroidManifest.xml to add <uses-feature> of "android.hardware.usb.accessory", <intent-filter> of "android.hardware.usb.action.USB_ACCESSORY_ATTACHED", and <meta-data> of resource="@xml/myfilter". <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.androidadkled" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="12" android:targetSdkVersion="17" /> <uses-feature android:name="android.hardware.usb.accessory"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" ...

Hello World ADK: Communication between Arduino Due and Android device

Image
The former post demonstrate half " Pre-Hello World for ADK ". It's further implemented to include communication between Arduino Due and Android Device. In Arduino Due side: it monitor any incoming data from accessory, and send it back. In Android side, it will send out the text when Send button clicked. And display the text received from USB. It implement the function of bi-direction communication between Arduino Due and Android Device. The code in Arduino side is listed here: #include "variant.h" #include <stdio.h> #include <adk.h> // Accessory descriptor. It's how Arduino identifies itself to Android. char applicationName[] = "HelloADK"; // the app on your phone char accessoryName[] = "Arduino Due"; // your Arduino board char companyName[] = "Arduino-er"; // Make up anything you want for these char versionNumber[] = "0.1"; char serialNumber[] = "1"; char url[] = "https://sites.google.com/si...

Pre-Hello World for ADK

Image
It's a very simple incomplete "Hello World" for ADK, working on Arduino Due with Android Device. In Arduino Due side, it simple loop to detect if adk isReady(). If adk ready turn on L led, if not turn it off. Also define the URL to download the app if not installed. #include "variant.h" #include <stdio.h> #include <adk.h> // Accessory descriptor. It's how Arduino identifies itself to Android. char applicationName[] = "HelloADK"; // the app on your phone char accessoryName[] = "Arduino Due"; // your Arduino board char companyName[] = "Arduino-er"; // Make up anything you want for these char versionNumber[] = "0.0"; char serialNumber[] = "1"; char url[] = "https://sites.google.com/site/arduinosite/exercise/helloadk/HelloADK_0.0.apk"; USBHost Usb; ADK adk(&Usb, companyName, applicationName, accessoryName,versionNumber,url,serialNumber); // Pin 13 has an LED connected on most Arduino boa...

Downloading the ADK 2012 Source

Image
The Android Accessory Development Kit (ADK) for 2012 is the latest reference implementation of an Android Open Accessory device, designed to help Android hardware accessory builders and software developers create accessories for Android. The ADK 2012 is based on the Arduino open source electronics prototyping platform, with some hardware and software extensions that allow it to communicate with Android devices. A limited number of these kits were produced and distributed at the Google I/O 2012 developer conference . If you did not receive one of these kits, fear not! The specifications and design files for the hardware were also released for use by manufacturers and hobbyists. You should expect to see kits with similar features available for purchase, or you can build one yourself! Downloading the ADK Source on Ubuntu The support software and hardware specifications for the ADK 2012 are available from the Android source repository. Follow the instructions below to obtain the source ...

Google I/O 2012 - ADK 2.0

Image
Introducing the new APIs and capabilities in ADK 2.0, with demos. Know more: Accessory Development Kit 2012 Guide

Test code for ADK on Arduino Due

Image
Arduino 1.5 BETA come with a ADK Terminal Test example to demonstrates USB Host connectivity between an Android phone and an Arduino Due. The ADK for the Arduino Due is a work in progress. For additional information on the Arduino ADK visit http://labs.arduino.cc/ADK/Index . To load the ADK Terminal Test example, select File in Arduino IDE -> Examples -> USBHost -> ADKTerminalTest. Open ADK Terminal Test BUT...it not work in my case! The function Serial.begin(9600) have to be called at the beginning of setup(). After then, it work as expected ( view the video ). From the thread http://arduino.cc/forum/index.php?PHPSESSID=13eedea106bcfa79b016f120f99a8f34&topic=129390.0 ADKTerminalTest /*  ADK Terminal Test  This demonstrates USB Host connectivity between an   Android phone and an Arduino Due.  The ADK for the Arduino Due is a work in pr...

Cabling to connect Arduino Due with Android device

Image
In order to connect Arduino Due with Android device to achieve ADK function , a Micro USB OTG Cable is needed, connected to Native USB Port of Arduino Due. Another normal USB cable is used to connect the USB OTG Cable and Android device. In such connection, the Arduino Due act as host, the Android act as accessory. Connect Arduino Due and Android device with OTG USB Cable

ADK running on Arduino Due

Image
After two day of try and test, I finally get the Arduino Due ADK sample sketch Arduino 1.5 BETA work on Arduino Due Board, link with HTC One X. In coming post, I will explain about: Cabling to connect Arduino Due with Android device Example code for ADK on Arduino Due Related: - My own Hello World ADK: Communication between Arduino Due and Android device

Arduino MEGA ADK R3 for Android

Image
The Arduino ADK is a microcontroller board based on the ATmega2560 It has a USB host interface to connect with Android based phones, based on the MAX3421e IC For information on using the board with the Android OS, see Google's ADK documentation. Android Development Board R3 board