Go Down

Topic: USB_Host_Shield_2.0-master problem (Read 513 times) previous topic - next topic

Eduard77

Hello guys,

I'm trying to make my board to recognize android and I'm using this code.
Code: [Select]



#include <WProgram.h>
#include <Arduino.h>
#include <Usb.h>
#include <AndroidAccessory.h>
#define ARRAY_SIZE 12
AndroidAccessory acc("Arduino inc.","Uno","Test","1.0","http://www.arduino.cc","15248798");
char hello[ARRAY_SIZE] = {'h','e','l','l','o',' ',
'w','o','r','l','d','!'};
void setup() {
Serial.begin(115200);
acc.powerOn();
}
void loop() {
if (acc.isConnected()) {
for(int x = 0; x < ARRAY_SIZE; x++) {
Serial.print(hello[x]);
delay(250);
}
Serial.println();
delay(250);
}
}

I made some modifications to work this properly but the problem is I think that the AndroidAccessory.h
is asking me for a variable called 'EP_RECORD' (at least this is the single error that I receive) that doesn't exist anymore in the Usb.h file in the USB_Host_Shield_2.0-master folder.
So if I understood properly the problem how can I fix it ?

Thanks



AlxDroidDev

What version of the library are you using?

HAve you tried downloading the latest one from https://github.com/felis/USB_Host_Shield_2.0/ ??

(this is the original repository for the library, not the one posted on Google code).
Some of my projects:
Shield for DS1337+, DS1624 and AT24C1024B (RTC, temp & mem): http://forum.arduino.cc/index.php/topic,126197.0.html
CHDK Camera remote shutter (BT, IR, USB): http://forum.arduino.cc/index.php?topic=295377.0

Eduard77

#2
Feb 09, 2015, 08:11 pm Last Edit: Feb 09, 2015, 08:13 pm by Eduard77
This is the one I'm using
USB_Host_Shield_2.0-master
downloaded from github
I added at the arduino ide as import library without unzipping it 

Go Up