Pages: 1 2 [3] 4   Go Down
Author Topic: Arduino Due and ADK 2012  (Read 17710 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The GS3 and the Nexus 7 can both recognize the Due with ADK 2012, I've tested with both. Are you running a custom ROM or kernel?  Perhaps one that leaves out USB accessory mode?

I use stock rom with rooted.
The GS3/Nexus 7 recognized the Due as "connected to a USB accessory". But ADK 2012 couldn't recognize the Due.
Connection:
PC-->USB Cable-->Programming Port on Due
Nexus 7/GS3-->USB Cable-->OTG-->Native Port on Due.
Logged

Corinth, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 92
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In that case it must be the way the Due is representing itself.  What sketch have you loaded on the Due?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In that case it must be the way the Due is representing itself.  What sketch have you loaded on the Due?

ADK 2012 should recognize the Due on Nexus 7. But waited a long time more than 5 minutes, ADK 2012 could not start correctly, it was forced stopped.
GS3 still could not recoginze the Due. I have loaded the sketch from Ardroid on this post.
Logged

Corinth, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 92
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ADK2012 is looking for a specific device, namely the ADK demo board that they handed out at I/O.  The device identifies itself by sending strings to android.  If you use the constants in the example from mikepparks, adk2012 should "see" the board... although of course none of the testing features will work by default since none of those circuits exist (unless you put them there).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,
I just confirmed upload of modified ADK2012 to DUE on both Mac and Win in my desk.
Mac:
 Macbook Pro 10.6 with JDK 6 DUE: program port
Win:
 Windows7 64bit   DUE: native port (BOSSA Program port (COM**))
Thanks to aleu and jamgofei and all.

Why don't the mac/windows tools use the same port for programming?
Logged

Corinth, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 92
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

they do.  rather, they can.  This is just how he did it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have my Due working with sound from a Galaxy Nexus but the quality is pretty poor. I put a 1KHz tone on my phone and played it through the Due and it quickly becomes apparent that there is something wrong. There are gaps in the audio which don't seem to be periodic. On the scope I see small gaps about a millisecond long. The gaps happen about every 100msec (or so). After the gap, the output continues at the same voltage which makes me think the dac might be sending the same value during the gap until more data is available. Anyone else observe this?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have my Due working with sound from a Galaxy Nexus but the quality is pretty poor. I put a 1KHz tone on my phone and played it through the Due and it quickly becomes apparent that there is something wrong. There are gaps in the audio which don't seem to be periodic. On the scope I see small gaps about a millisecond long. The gaps happen about every 100msec (or so). After the gap, the output continues at the same voltage which makes me think the dac might be sending the same value during the gap until more data is available. Anyone else observe this?

Can you control volume when audio out via Due?  I could not adjust volume when output audio via Due.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,  http://labs.arduino.cc/uploads/ADK/ArduinoTerminal/ThibaultTerminal_ICS_0001.apk
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.
« Last Edit: April 21, 2013, 09:32:52 pm by lier » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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"

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Code:

New_Board.name=My Own Board
New_Board.upload.tool=bossac
New_Board.upload.protocol=sam-ba
New_Board.upload.maximum_size=524288
New_Board.upload.use_1200bps_touch=true
New_Board.upload.wait_for_upload_port=false
New_Board.upload.native_usb=false
New_Board.build.mcu=cortex-m3
New_Board.build.f_cpu=84000000L
New_Board.build.core=arduino
New_Board.build.extra_flags=-D__SAM3X8E__ -mthumb
New_Board.build.ldscript=linker_scripts/gcc/flash.ld
New_Board.build.variant=arduino_due_x
New_Board.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a


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

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
« Last Edit: July 08, 2013, 01:27:18 pm by newhobby » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 (26.35 KB, 320x240 - viewed 31 times.)
Logged

Pages: 1 2 [3] 4   Go Up
Jump to: