[DEV][AADK] Google's Arduino based "ADK" Working on Nexus One

Search This thread

Nikropht

Senior Member
I managed to snag an Android Accessory Development Kit from Google IO. ;)

After wrangling all the necessary code bits together I got the demo code running on the Arduino board and my Nexus One.

The first picture you can see the phone reading the sensors of the demo shield, button states, the temperature, a light sensor and the joystick position.

In the second picture the phone is controlling the led colors and has one relay turned on.

In the last picture you can see that the phone detects the board being plugged in, Android knows there is no app installed for the board and it cannot be found in market.

The Nexus One is running a rooted 2.3.4 ROM from this thread

P.S. Mod's can we get a forum section for Android Accessory Development?

Now for Pics.
 

Attachments

  • 220595_2028221823120_1171293854_32484763_2422308_o.jpg
    220595_2028221823120_1171293854_32484763_2422308_o.jpg
    96.5 KB · Views: 1,928
  • 241461_2028219623065_1171293854_32484761_532902_o.jpg
    241461_2028219623065_1171293854_32484761_532902_o.jpg
    95.1 KB · Views: 1,836
  • 243297_2028218703042_1171293854_32484760_947998_o.jpg
    243297_2028218703042_1171293854_32484760_947998_o.jpg
    93.9 KB · Views: 1,724

ObsidianX

Senior Member
Apr 1, 2009
89
259
San Jose
Hey, I've been attempting to hack in the support into CM7 (nightly, 2.3.4) on my EVO without much success. I've rebuilt the kernel with the necessary flag enabled and ripped the JAR/XML files from the Nexus S update.

I've monitored logcat and seen that it does find the framework JAR (the application wouldn't install otherwise since it's a needed feature) and a dmesg scan shows that the kernel driver is being initialized.

What's happening now is I plug in the ADK and the output from the Arduino board spams that it couldn't get a protocol version from the phone. The phone slows down to a crawl as its probably being spammed with requests from the ADK for a protocol version and doesn't know what to do.

I'm at a loss here as to what I could possibly be missing. If you have any insight through your own endeavors it would be much appreciated.
 
  • Like
Reactions: AndroidAmigo

SoyoBro

Member
Jan 27, 2011
13
3
Great stuff! I was also at Google I/O and picked up an ADK. Can you post the apk file of your app? I'd love to try it out.

And if you're feeling generous...the code? :)
 

przemo_pl

Member
Dec 21, 2010
39
3
Warsaw
uh uh, why i wasn't at the Google I/O :(
Google is doing really good s**t nowadays. I suppose that Arduino will guest in my house in some time as I am fascinated ;)
 

Rock_Harder

Member
Aug 24, 2010
41
3
Giessen
I am Actually using the ADK with my Nexus One on an Arduino UNO and an USB-Host Shield from Sparkfun, it works equal but only take a fraction to buy it :D

My first project is an interface for my Audi, at the moment i only use it to start the Motor, but in future i want to try to build a CAN-BUS interface...
 

Nikropht

Senior Member
Great stuff! I was also at Google I/O and picked up an ADK. Can you post the apk file of your app? I'd love to try it out.

And if you're feeling generous...the code? :)
You can find all the ADK instructions and code here.

Note: When you select your build target you must choose
Target Name - Vendor - Platform - API Level
"Google APIs" - "Google Inc." - "2.3.3" - "10"

Otherwise you will get errors trying to build on the new libs. The instructions on the ADK page wern't very clear about this. Took me awhile to figure that one out.
You will need to update your Android SDK if you don't see those options.

-Nik
 

Rock_Harder

Member
Aug 24, 2010
41
3
Giessen
As for the point of using an arduino uno, Oleg is providing an newer version of his USB lib, it now works with his shield and the ADK.


My car is almost starting with the ADK, i am only missing a few relays and stuff to get it completed but i posted a proof of concept on youtube. Text an explanation is all german, sorry for that

http://www.youtube.com/watch?v=FlvpMwSxgMg

if there are any questions Ill be here for you
 

knox420

Senior Member
May 27, 2010
130
61
Great stuff. I am really looking forward to this.
But what I don't get is which hard- and software is required:

- is 2.3.4 sufficient?
Answer: YES
- do other devices (running 2.3.4) than the Nexus 1/S work?
Answer: Pending
- will an Arduino Duemilanove board work?
Answer: NO

Thanks for your help, guys

Besides those questions I have one more:
- assuming I have a board that is connected to a power supply. will i be able to charge an Android device when connecting the board to the handset via USB?
Answer: depends on the boards and its power consumption/outlet. Basically, it should
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hey, I've been attempting to hack in the support into CM7 (nightly, 2.3.4) on my EVO without much success. I've rebuilt the kernel with the necessary flag enabled and ripped the JAR/XML files from the Nexus S update.

    I've monitored logcat and seen that it does find the framework JAR (the application wouldn't install otherwise since it's a needed feature) and a dmesg scan shows that the kernel driver is being initialized.

    What's happening now is I plug in the ADK and the output from the Arduino board spams that it couldn't get a protocol version from the phone. The phone slows down to a crawl as its probably being spammed with requests from the ADK for a protocol version and doesn't know what to do.

    I'm at a loss here as to what I could possibly be missing. If you have any insight through your own endeavors it would be much appreciated.