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 of UOTGHS_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.
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.
@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 ?
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?
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?