Question

I tried to connect an Arduino Mega ADK using Demokit sources to several phones in vain.

I compiled and upload the Arduino sketch "Demokit.pde" with arduino 0022. It looks ok as the board sends "start" on its usb client port.

I compiled Demokit app under Eclipse using Google API 10 (for phones running Gingerbread) and Android API 15 (for ICS ones). Everything fine.

On the phone side, I tried these setups :

  • samsung i9000 running CM 7.1 and after pushing android.hardware.usb.accessory.xml and com.android.future.usb.accessory.jar

  • samsung i9000 running ICS

  • nexus S running ICS

And nothing happened. There's only a warning in the eclipse logcat :

W/PowerUI(654): unknown intent: Intent { act=android.intent.action.ACTION_POWER_CONNECTED flg=0x10000010 }

Nothing else. I wonder if the board can have a problem on its usb host...

If anybody has an idea?

Thanks

Was it helpful?

Solution 2

The problem came from the setup procedure in the Demokit.pde sketch. I used a bread board to run it but I didn't connect all components and the i2c joystick initialization needs the component to be connected otherwise the procedure goes into an infinite loop. So if you try to run Demokit.pde without the demokit board be sure to connect the right joystick, or comment its init procedure call.

OTHER TIPS

There are couple of places where things go wrong.

First to check the board, try running a simple blink program, to make sure that the board itself is working.

Next when you connect your to the board, does your phone starts to charge? This will show whether there are any issues with the phone-board connectivity.

Out of the 3 phones, I would suggest you to try with nexus S, with stock ROM, since CM (even after pushing the jars) has issues enabling ADK.

The demokit example is actually rather complex for an initial test. I would suggest after running the blink program to make sure your Arduino Mega ADK is working to try a simpler first test.

There are a couple of good examples that are much simpler than demokit.

http://allaboutee.com/2011/12/31/arduino-adk-board-blink-an-led-with-your-phone-code-and-explanation/

http://digitalhacksblog.blogspot.com/2012/05/arduino-to-android-turning-led-on-and_29.html

Neither of these target an Arduino Mega ADK so some changes will be necessary but they should be a good place to start.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top