Arduino USB Host Shield Compatible with Google Android ADK Support UNO MEGA

Customer Review 0Review(s) | Product Details
482 Units in Stock
Price :
US$17.63



Quantity: - +
Total :
US$17.63
VIP Center Learn more 0
Silver VIP 3% off
Gold VIP 5% off
PLATINUM vip 10% off


Introduction

  • USB Host shields is an Arduino USB Host expansion board. Into the Arduino motherboard can have USB Host function. Have the function of the Host Ardhuinocan realize many functions, such as support U disk, support USB keyboard mouse,support USB camera.

  • And in these functions, the most attractive is the "support connecting the android mobile phone, Google ADK functions. This makes can use cell phones as control side to control your robot or other equipment, at the same time can also be collected all kinds of data in the mobile terminal display.

  • As a first step, material preparation, now if you want to support Google ADK function, need an Android phone firmware in v2.3.4 didn't support or higher version. Here we use the Nexus S firmware version is v2.3.4

  • More detailed ADK, please see the official website: http://developer.android.com/guide/topics/usb/adk.html

  • The second step, the Arduino motherboard burn-in demo code, will download adk_release_0512.zip "AndroidAccessory" and "USB_Host_Shield1" in the library on the... \ \ the arduino - 0022 libraries, below. Arduino burn-in we provide Android LED test code.
    Install the USB host test APK on Android:

  • The demo apk USB Host shields :https://github.com/felis/usb_host_shield/tree/dev Library 1.0

  • Demo apk USB Host shields 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

  • Third, connect as shown in figure.

  • The fourth step: after the connection is successful, APK find USB host interface after jumping into control interface, click the OUT button, control interface as follows, slide in the mouse button, can control the LED light and brightness.

Arduino LED - USB host control demo

#include

#include

#include


#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);

}


Reviews

Create your own review

You can get 5 SmartArduino Points by commenting on the products( Login first ).

User Name: *
Comment Rank: 1 2 3 4 5 *
Confirm Text: captcha *
Content: *