FORUMS

How to Root the LG G4 and Install TWRP Recovery – XDA TV

A rooting method has finally been found for the flagship LG G4. In this … more

New Xposed for Lollipop 5.0 Update Fixes Major Bugs

Senior Recognized Developer rovo89 has patched Xposed for Lollipop 5.0 to … more

Download Sony’s new AOSP-like concept for Xperia Z3

Over in our forums, Recognized Contributor Jozinek has posted a very … more

OnePlus 2 vs Moto X Style: Which is The Better Flagship?

Two big industry names have announced their newest flagship phones within the … more

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

56 posts
Thanks Meter: 7
 
Post Reply Subscribe to Thread Email Thread
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.
Attached Thumbnails
Click image for larger version

Name:	220595_2028221823120_1171293854_32484763_2422308_o.jpg
Views:	1918
Size:	96.5 KB
ID:	600018   Click image for larger version

Name:	241461_2028219623065_1171293854_32484761_532902_o.jpg
Views:	1830
Size:	95.1 KB
ID:	600019   Click image for larger version

Name:	243297_2028218703042_1171293854_32484760_947998_o.jpg
Views:	1718
Size:	93.9 KB
ID:	600020  
 
 
20th May 2011, 02:52 AM |#2  
nicholasblock's Avatar
Junior Member
Flag Green Bay
Thanks Meter: 19
 
More
Now that is bad a**!!! I was waiting for something like this!!
20th May 2011, 09:27 AM |#3  
Member
Flag San Jose
Thanks Meter: 255
 
Donate to Me
More
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.
The Following User Says Thank You to ObsidianX For This Useful Post: [ View ]
21st May 2011, 02:50 AM |#4  
Junior Member
Thanks Meter: 3
 
More
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?
21st May 2011, 03:30 AM |#5  
Senior Member
Flag Norman, OK
Thanks Meter: 2
 
More
badass. good ****
21st May 2011, 05:09 AM |#6  
bharathp666's Avatar
Junior Member
Bangalore
Thanks Meter: 1
 
More
Well done mate...
Have tried it out with arduino UNO?...
21st May 2011, 10:15 AM |#7  
Member
Flag Warsaw
Thanks Meter: 3
 
More
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
21st May 2011, 10:24 AM |#8  
Member
Flag Giessen
Thanks Meter: 3
 
More
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

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...
22nd May 2011, 04:50 PM |#9  
Nikropht's Avatar
OP Member
Flag Flower Mound, Texas
Thanks Meter: 7
 
More
Sure here is the compiled ADK.

-Nik
Attached Files
File Type: apk DemoKitLaunch.apk - [Click for QR Code] (2.71 MB, 107 views)
22nd May 2011, 04:52 PM |#10  
Nikropht's Avatar
OP Member
Flag Flower Mound, Texas
Thanks Meter: 7
 
More
Quote:
Originally Posted by bharathp666

Well done mate...
Have tried it out with arduino UNO?...

The Arduino UNO doesn't have native USB Host support onboard like the megas.
You will need a USB Host shield and will have to modify the Arduino code.
22nd May 2011, 04:59 PM |#11  
Nikropht's Avatar
OP Member
Flag Flower Mound, Texas
Thanks Meter: 7
 
More
Quote:
Originally Posted by SoyoBro

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

Read More
Post Reply Subscribe to Thread

Tags
accessory development kit, adk
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes