Android to Arduino

We have several projects underway that connect an Android phone to a robot via Arduino boards. You can check out our post on the Truckbot or the Tankbot to see each of them in detail. Here we’ll provide an overview of the platform.

You can see the first working prototype in action in this video.

The technologies we’re using are:

  • Android G1 phones modified to run Cyanogen so that serial out works over the USB port
  • Arduino prototyping boards for talking to the servos and running low level logic
  • Android Scripting Environment for executing Python code on Android
  • Servos modified for continuous rotation

You can read more about the technical details of connecting an Android G1 to an Arduino board in this Intructable. Then get a general overview of the work we’ve been up to in this slideshow.

What can it do? A sample of the commands are:

  • F,B,L,R – move forward, backward, left, or right
  • P = N,E,W,S – point North, East, West, South using onboard compass
  • H – Say hello
  • X – “X” marks the spot, so speak your current city and state using GPS
  • T= “text to speak’ – use text-to-speech for any text string
  • A – record audio from the onboard mic and save it to the SD card

We’ve share the source code for everything on the Cellbots project site on Google Code. A full list of the commands that we have working so far are in the README file here.

7 Responses to “Android to Arduino”

  1. [...] have information on how to get started on our Android Arduino page. We hope you’ll give this project a try and leave comments here or on the open source code [...]

  2. Your project is cool. Another alternative is using a Bluetooth connection for Arduino BT for example. I have a Nexus One Unit and I think that it is possible to use it to create another robot.

    Cheers

  3. Dan Reich says:

    You guys attempt this with the Motorola Droid?

  4. ryan says:

    We have not tried this with a Droid yet. We probably will wait until we get BlueTooth working since it isn’t clear that we could get serial out of the Motorola USB port.

  5. Brian says:

    I too was wondering about the droid, I didn’t know if the usb port had host capabilities, and it is surprisingly difficult finding documentation about the usb port. Still, it’s nice to know the G1 has host capabilities, I didn’t know that! :)

  6. ryan says:

    The G1 does not have host capabilities. The HTC USB port happens to have two pins that can be used for serial commands with the Cyanogen build.

    That is how we talk to Arduino, not over a true USB connection, which would require being a host and having drivers.

  7. michael says:

    We are working on a similar thing for the droid. We were able to send serial over the speaker jack at 9600 baud. http://www.flakelabs.com/index.php/2010/01/jack-video-uploaded/

    We plan on shipping a kit as soon as we have time to finish up some testing and do a board layout.

Leave a Reply