[Retired] USB Host Shield (for Arduino UNO MEGA Google ADK ANDROID)
$21.80
- Description
- Additional information
- Reviews (0)
- Enquiry2
Description
This is revision 2.0 of USB Host Shield.
Arduino USB Host Shield board – Let your Arduino support Android phone
Support Google Android ADK function, support Android phone: G1, Nexus One, Nexus S, Motorola Droid X (Phone system needs upgrading to Android 2.3.4, Tablet PC need to upgrade to Android 3.1)
Arduino compatible with the following hardware:
- Arduino Uno 328
- Arduino Diecimila / Duemilanove 328
- Arduino Mega 2560 (??recommended)
- Arduino Mega 1280
Using Arduino USB HOST function, let your Arduino communicate with other USB devices, and supports USB HUB function.
1. Check the website to see more information about ADK: http://developer.android.com/guide/topics/usb/adk.html
2. write demo code into arduino board, and download adk_release_0512.zip, put “AndroidAccessory” and “USB_Host_Shield1” library into …\arduino-0022\libraries\
install the APK into your android phone:
demo apk USB Host Shield Library 1.0:https://github.com/felis/USB_Host_Shield/tree/dev
demo apk USB Host Shield Library 2.0: https://github.com/felis/USB_Host_Shield_2.0
ADK Arduino Library :https://dl-ssl.google.com/android/adk/adk_release_0512.zip
3. Make the wiring like this
4. After successfully connected, you will be moved to the control interface after found the USB host, select OUT,flip mouse button, and you can control on/off and lightness of the LED.
Arduino LED – USB host control demo:
#include <Max3421e.h>
#include <Usb.h>
#include <AndroidAccessory.h>
#define LED 8
AndroidAccessory acc(“Google, Inc.”,
“DemoKit”,
“DemoKit Arduino Board”,
“1.0”,
“http://www.android.com“,
“0000000012345678”);
void setup()
{
Serial.begin(115200);
Serial.print(“\r\nStart”);
acc.powerOn();
pinMode(LED, OUTPUT);
digitalWrite(LED, 0);
}
void loop()
{
byte msg[3];
if (acc.isConnected()) {
Serial.print(“Accessory connected. “);
int len = acc.read(msg, sizeof(msg), 1);
Serial.print(“Message length: “);
Serial.println(len, DEC);
if (len > 0) {
// assumes only one command per packet
if (msg[0] == 0x2) {
if (msg[1] == 0x0)
analogWrite(LED, msg[2]);
}
}
}
delay(100);
}
Relevant links:
- Website: http://www.circuitsathome.com/category/mcu/arduino
- library: https://github.com/felis/USB_Host_Shield_2.0
- How to establish ADK hardware platform tutorial:http://www.circuitsathome.com/mcu/building- google-adk-hardware-from-standard-components
Documentation will be sent by Email:
1.Schematics
2.Arduino demo code library,Google ADK code
Additional information
Weight | 0.02 kg |
---|
Reviews
There are no reviews yet