Hello,
I have an arduino Uno hooked up to a Keyes, funduino USB host shield, which I'm guessing is just a clone of the circuits at home version. I'm trying to interface this to an android Motorola Xoom tablet via the ADK (Periféricos e acessórios Android | Android Open Source Project).
I'm using this library (USB Host Shield 2.0: USB Host Library Rev. 2.0) and specifically just trying out some of the demo code in the examples section which is here (USB_Host_Shield_2.0/ArduinoBlinkLED.ino at master · felis/USB_Host_Shield_2.0 · GitHub) for the arduino code and here (GitHub - Lauszus/ArduinoBlinkLED: Source code to use with: https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/adk/ArduinoBlinkLED/ArduinoBlinkLED.ino) for the android code.
The code basically makes the onboard led of the uno turn on or off when you push a button on the android device.
Once I've uploaded the code to both of the devices the arduino simply gives me the initialisation verification "ADK demo start" and then when I look at the android debug output it just says mAccessory is null meaning it can't find any devices to connect to.
One strange thing is that even though I know it's going through the loop even if I set digitalWrite(led, HIGH) it doesn't do anything. It will never turn the led on even though the basic blink sketch provided with the libraries does do this.
No other errors. None. I can't work out why it won't work. Usb shield test program works fine. Android code compiles and runs. External power supply. I've tried both the future library and the native library. I've tried multiple examples. I've tried forcing the avr pins to the uno mode. Nothing. It's driving me insane.
Is there any other configuration that I need to do to get this thing to work? The docs are non existent so I can't see anything that describes how to set up the code for different devices or something.
Anyway, any help appreciated, even if it's, that device will never work buy this and this.