[FIXED] ArduinoMegaADK R3 - Google ADK2011 sketch doesn't work

Hi,
i followed this step-by-step Google ADK2011 instructions:
http://developer.android.com/tools/adk/adk.html
(it is 100% work because i found a proof that this board may be used without original code modification: http://www.youtube.com/watch?v=iKMUF5jS9lU)

  1. sketch verified & compiled succesfully;
  2. uploaded sketch to the board;
  3. installed “ADK DemoKit” app from GooglePlay;
  4. launched app on android device (Nexus 7);
  5. connected the USB Host cable;

and NOTHING. Board hasn’t been detected by android. :astonished:

SOLUTION:
remove all code related to servos, leds, capacitive sensors, etc…

#include <Max3421e.h>
#include <Usb.h>
#include <AndroidAccessory.h>

AndroidAccessory acc("Google, Inc.",
		     "DemoKit",
		     "DemoKit Arduino Board",
		     "1.0",
		     "http://www.android.com",
		     "0000000012345678");

void setup();
void loop();

byte b1, b2, b3, b4, c;
void setup()
{
	Serial.begin(115200);
	Serial.print("\r\nStart");
	acc.powerOn();
}

void loop()
{
        //Serial.print("\r\nLOOP");
	byte err;
	byte idle;
	static byte count = 0;
	byte msg[3];
	long touchcount;

	if (acc.isConnected())
            {
                Serial.print("\r\nAcc is Connected");
		int len = acc.read(msg, sizeof(msg), 1);
		int i;
		byte b;
		uint16_t val;
		int x, y;
		char c0;

		if (len > 0) {
               Serial.print("\r\nMessage Received");} 
	} else {
                Serial.print("\r\nAcc is NOT Connected");}

	delay(10);
}

In my case, the sketch will work when comment out the joystick initialization and add some delay before acc.PowerOn() in setup(); e.g.:

void setup() { Serial.begin(115200); Serial.print("\r\nStart");

init_leds(); init_relays();

init_buttons();

// init_joystick( 5 );

// autocalibrate OFF touch_robot.set_CS_AutocaL_Millis(0xFFFFFFFF);

servos[0].attach(SERVO1); servos[0].write(90); servos[1].attach(SERVO2); servos[1].write(90); servos[2].attach(SERVO3); servos[2].write(90);

b1 = digitalRead(BUTTON1); b2 = digitalRead(BUTTON2); b3 = digitalRead(BUTTON3); b4 = digitalRead(JOY_SWITCH); c = 0;

delay(1000); acc.powerOn(); }