Arduino Due and ADK 2012

The volume over the usb seems to be fixed but there is a line in the code on Due that claims to be a volume adjustment; after combining the left and right channel, they multiply by a value and the comment is something about volume adjustment.


Great! I have the following questions:

  1. Which Arduino IDE do you use? arduino-1.5.1r2? or adk2012_ide-win32-20120629?
  2. What app do you use on Nexus 7 to transfer data to Due?
  3. Is DC to supply power a must? Arduino Due can’t work when I use a DC–3.3V & 2.0A. What DC do you use?
  1. Used ADK2012 IDE from Google
  2. This Terminal App,
  3. You can use computer’s USB power and I’ve tested 12V DC external power also. It works either way. (Arduino DUE has some issue with USBVSB (USB Master power control) That’s why usbh.c needs to updated to work properly on DUE.

When use ADK2012 IDE for Due, do you copy board definition from Arduino IDE 1.5.1 to ADK2012 IDE? Since pin array of Arduino Due is different from Google ADK2. For example, Blink sketch will not blink LED if you choose board Google ADK2, because Google ADK2 define PC9 as pin 13, Arduino Due use PB27 as pin 13. I copy directory hardware/arduino/sam/variants/arduino_due_x from Arduino IDE 1.5.2 to ADK2012 IDE and select it as board, but some errors happen during compiling. Do you know have any idea or experience about this issues? Thanks.

I am in the same boat as lier. Can someone describe the process for compiling and uploading sketches from the ADK 2012 IDE to the Due? Uploading from Arduino IDE works fine for me but not the ADK.


I am trying the ADK2012 code on Due and facing the following Compiling Error. I saw someone mention the problem, but could not find a way to resolve it.

"C:\Users\xyz\Desktop\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\variants\arduino_due_x/libsam_sam3x8e_gcc_rel.a(uotghs.o): In function UOTGHS_Handler': uotghs.c:(.text.UOTGHS_Handler+0x0): multiple definition ofUOTGHS_Handler' ADK2\usbh.c.o:C:\Users\xyz\Desktop\arduino-1.5.2-windows\arduino-1.5.2\libraries\ADK2/usbh.c:684: first defined here collect2: ld returned 1 exit status"

So, did anyone got around the UOTGHS_Handler conflict yet? I was able to compile and upload just fine with the ADK2012 IDE version, but not with 1.5.2 I had to use the native port, which requires me to press erase before the upload and also requires me to disconnect the usb cable to plug the OTG cable. I'd love to be able to upload through the programming port instead and use bossac instead of adk2install. So, if anyone was able to get around the UOTGHS_Handler issue, please let me know or pm me. Thanks in advance.

Ok, I just wanted to post my progress. I was able to compile and upload the terminal code posted on the original thread to a Due board using IDE 1.5.2 using the programming port. The original ADK2012 IDE required the native port. After digging for a few days and comparing with the Google released ADK2012, I realized the problem is with the arduino reset code built-in on the libs to erase the flash when native port is used for programming (AKA open serial at 1200bps). By having this code enabled all the time will disable the native port from ever being able to act as OTG port. But the trick is that if this code is not enabled, you won't be able to erase flash and upload using native port on a single shot. You will need to press the ERASE button. In my case, I'm never planning on using the native port for uploading code anyway, so my solution works out great for me. My solution was to create a new board reference in the boards.txt file and remove the flags for the CDC serial on native port. Own Board
New_Board.upload.native_usb=false -mthumb

And add an ifdef on the USBCore.cpp to disable the CDC code.

#ifdef USBCON

Original USBCore.cpp code goes inside the ifdef. I can't add or the post is too long and exceeds the maximum allowed length of forum, which is 9500 characters.

#endif // USBCON

Thanks for your post, its really helpful for a newbie like me. I just need to know how did you connect speaker. I have this speaker as shown in the attached image. Can I directly connect it to DAC0 and GND pins of Arduino? if not please suggest.

image (1).jpeg

DO NOT connect directly your speaker to the DAC pin. Please, read and follow the following updated tutorial.


jangofei: C:\ADK2012_IDE_0/hardware/tools/adk2tool.exe COM3 erase erasing...done. C:\ADK2012_IDE_0/hardware/tools/bossac.exe --port=COM3 -w -b C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build5785210613214747736.tmp/Arduino_Terminal_App_Sample.cpp.bin No device found on COM3 C:\ADK2012_IDE_0/hardware/tools/adk2tool.exe COM3 reset resetting...done.

Guys, I'm trying to use a MEGA ADK and I arrived at the same point: troubles in detecting the MEGA on the COM. Any suggestions? tnx! a

You must use native port

Thanks, I'll try! a

@newhobby, connecting the MEGA ADK using native usb, windows doesn't see anything on the usb. Is there any driver to install to make the pc see the port?

I think you are in the wrong thread.
This is for a Due board and not Mega.
Also, maybe you ought to start with blink code before you start trying to use Goodle ADK stuff.

I'm sorry but i didn't found any mega adk thread. If you know where is it, would you be so kind to tell me? No problem with adk 2011 so far, but as i read through the forums adk 2012 is not so immediate. Thanks Andrea


i'm trying to use a Due with a Nexus4 phone. I've compiled an loaded the sample successfully (thanks to your code modifications tips :)), but when i plug the Due on the Phone, the phone battery charge status start to blink, and i get a repeated "disconnected" message in the arduino serial console. (the phone detect an adk accessory sometimes, somtimes not...) I use a USB-A female <-> micro-B male on the phone side (not referenced as OTG), is it a problem ?

Another question, has anyone tested a blutooth shield on the Due ? and the ADK2-over-BT feature ?



Have you tried using an external power source? I was fighting trying to get this to work with my Galaxy S4, had no luck til I plugged in a wall wart.

I am using an OTG adapter though...

Yes, i’ve tried this weekend with a power supply and it’s now working perfectly :smiley:

Hi all,

I've tried this example and it worked: Is this example use "ADK 2012"?

Just another question, someone know what's the advantage to use processing ( Someone built the communication of Arduino due + Android app developed with processing?

Thank you.

Processing + Eclipse + Android + Arduino Due (USB and adk.h)

The video example working:

based on example:

Phone: 4.1.2 GT-S6812B

newhobby: And add an ifdef on the USBCore.cpp to disable the CDC code.

#ifdef USBCON

Original USBCore.cpp code goes inside the ifdef. I can't add or the post is too long and exceeds the maximum allowed length of forum, which is 9500 characters.

endif // USBCON

Hello and thanks to everybody in this thread now i'm able to upload a working sketch to my arduino that can communicates with my android mobile phone. I have one question about programming arduino DUE. Until now i was able to upload working sketch only with native port. i read that there is a solution to use the programming port and the native port. I unaderstand almost everything escept the part tha i quoted. Anybody can explain me this part?

Thanks in advance.

Hi everyone! Thank you to everyone in this thread. Special thanks to ardroid. I have finally made arduino due usb audio work. I would like to make BT audio work too. Has anyone here succeeded on it? Google's adk2012 was using custom ckt and stack with TI cc2564. It's not available in the country I'm in and it's also smd which is difficult for me to solder some pins into. I tried using HC-06 but it only supports serial communication. If you were able to succeed BT audio, could you share what BT module or chip you used and some code maybe?