problem uploading program to ADK Main Board

I am using ADK main board, but the problem is Uploading Firmware.

I have followed the instructions

  1. set the VCC slide switch to 5V,
  2. Connect the Seeeduino ADK Main Board - Micro USB to PC USB port.
  3. Set the Board type in Arduino IDE to Arduino Mega 2560.
  4. Compile the Demo Sketch

the above steps are all fine, but just get stuck in the uploading the problem until timeout, showing avrdude: stk500_2_ReceiveMessage(): timeout

The usb cable I used is from HTC android, I can upload the android problem upto the HTC, so I think the USB cable is fine.

So now I don’t figure out what is the problem, something wrong with board or something wrong with usb cable

Dear customer,

Arduino 1.0 is not compatible, I was used Arduino 0023 to up load the demo codes is perfect.

Here is the code:
//Seeeduino ADK Demo using Niels Brouwers’ MicroBridge library.
//Connect a LED to D12 and a variable resistor(POT) to A0

#include <SPI.h>
#include <Adb.h>

// Adb connection.
Connection * connection;

// Elapsed time for ADC sampling. The rate at which ADC value is sent to Android device.
long lastTime;

//State of LED. Initially OFF.
uint8_t LEDState=0;

// Event handler for the shell connection.
// This event handler is called whenever data is sent from Android Device to Seeeduino ADK.
// Any data / command to be sent to I/O of ADK has to be handled here.
// For eg: 1.Controlling an ouput port 2.Interacting with a device connected
// to ADK via IIC or Serial Port.

void adbEventHandler(Connection * connection, adb_eventType event, uint16_t length, uint8_t * data)

// In this example Data packets contain one byte and it decides the state of a LED connected to D12
// The size of data is predetermined for this application. Android device also uses the same size.

if(LEDState != data[0])
digitalWrite(12, data[0]); // Change the state of LED
LEDState = data[0]; // Store the State of LED


void setup()
//Serial port debug purpose

// Note start time
lastTime = millis();

// Set Digital pin 12 (LED is connected) as output

// Initialise the ADB subsystem.

// Open an ADB stream to the phone’s shell. Auto-reconnect. Use any unused port number eg:4568
connection = ADB::addConnection(“tcp:4568”, true, adbEventHandler);


void loop()
//Check if ADC needs to be sampled.
if ((millis() - lastTime) > 20)
//Read ADC value
uint16_t data = analogRead(A0);

//Send the ADC value to Android device as two bytes of data.
lastTime = millis();


// Poll the ADB subsystem.

If you can attach your code here, it would be helpful.

I had a similar problem, however my adk was working fine with the arduino 1.0 and then just today nothing, when i try to upload a sketch it just hangs up. the code compiles and the upload begins, but then it just stays in the upload state. any Ideas?


May be reboot the PC?
Or reset the board?
If so, you try to think about ADK has any problem with Arduino?

Best regards,