iPhone Create Controller - The project that never quite got released

Hello Botball community! My name is Alexander Nabavi-Noori, and I was an acting YAC member last year. Today I am here to release into the wild a really cool project that I, and my friend James Linnell worked on in our spare time last year. Its called the iPhone Create Controller. This was going to be a paper we were going to submit, but as all engineers know: shift happens. But now i'm here in an effort to give this project at least *some* time in the spotlight. So, without further ado let me dive into an explanation of what the heck this actually is.

First of all, what is this project? Well as the title sort of gives away, this is a system of using an iPhone (or iPod Touch) as a crazy (albeit awesome) remote control for any iRobot Create or iRobot Roomba. How you may ask? Using the iPhone's tilt controls (accelerometer to you computer literate people) and amazing capacitive multi-touch screen! Oh yeah you heard me right, you can actually sit on the couch, watch TV, and vacuum your house with your iphone. If you're not already sold on the idea, then there is something wrong with you! Moving on. This project was developed by Alexander Nabavi-Noori and James Linnell. We came up with the idea for this completely out of boredom and lack of anything else to do.

Alright so you got the basic idea, now how did we do it? First of all here's what we needed:

• an iRobot Create/Roomba
• an Apple Computer running OS X
• White Create Interface Cable and USB Serial Converter OR BAM bluetooth receiver (BAM only works with Create)
• Our software

Ok, so now how did we actually put this stuff together? Well to put it simply, we needed two parts to make this work. Because of restrictions in the iPhone SDK we are unable to connect directly to the create wirelessly using bluetooth (To all of you who just got out their jailbroken phones, put them away we're not gonna go there!). Because of this, we needed a median. Something that the iPhone *could* connect to that at the same time could relay the instructions that the iPhone sent over, and send them to the Create/Roomba. So we chose the easiest thing we could think of, a mac. We had a couple lying around anyway, so why not! So here's how the system works in a nutshell:

We have software running on both the iPhone and the Mac. The iPhone would take the input from the user (be it tilt, or multi-touch) and it would then convert that into values that we could use. These values for us were from -1 to +1 (the easiest values we could convert to create values). From there it had to be able to send these to the mac. So, we used built in networking frameworks in the iPhone to setup a connection between the phone and the Mac (the phone running the client side and the mac running the server side code). The iPhone would take the values it generated and put them into an array, serialize the array, and send it as one identifiable packet to the mac. The array would hold different values depending on the type of control. For the main type (accelerometer) it would hold X value, Y value, and timestamp. And for touch controls it varied, but usually it just held one value specific to the control type. Now, the mac would have received this packet containing the data. It would then proceed to decode, deserialize, and then translate the data (the iphone sent raw data rather than processed data ready for the create because we didn't want to slow it down with the stupid math, so we did the math on the mac). After that, if would use our library to talk to the create. It would first connect to the serial port [defined by the user (i.e. bluetooth or usb port)] and then it would start to write the commands that we generated to the create.

So that's basically how it works in a nutshell. In between all of that of course is our massive amounts of code, and lots of craziness that happens in the background to make this all work.

So now, if your still reading and not bored of this yet, then I'm going to assume you want the source code right? I knew it! Well it *will* be available for everyone. BUT it will not be available as of the original posting of this article. Why? Because we want to make it nice and pretty for you all!! Plus we have an old website we made for the project that gives detailed explanations, and blog posts of our progress that we want to dig up so that we can show you guys as well.

But we're not going to leave you completely empty-handed. In fact we're going to give you two goodies for now! The first is a keynote presentation about the project we made to present this to some of our peers (attached) (also, bear in mind this keynote is really old and might not be completely accurate). And the second is a teaser video of this actually working! (http://www.xandernet.net/iphone-create-controller-demo.m4v)

Now depending on the amount of interest this gets, is how soon we will post the source code for the project, in the meantime if you are absolutely dying to see it, you can email James (jman012guy@gmail.com) or Alexander (xander787@yahoo.com) and ask for the source, or any questions you may have! Well thats all folks! See you soon!

AttachmentSize
iPhone Keynote.zip3.33 MB