Control your Roomba using the MacBook’s Sudden Motion Sensor

The folks at Hacking Roomba have written a Perl script to control a Roomba …

I write for Infinite Loop, so it probably goes without saying that I (mostly) love MacBooks. But even more than MacBooks, I love the Roomba. Ever since my parents bought me a self-docking Roomba for my birthday last year, I've been sold on the little robot that freaks out my cats and sucks up evidence of parties bygone. I love that little song he plays when he docks himself again. He's like a member of my family.

Aaaaaaaaaaanyway...

When I saw this article at Hackingroomba.com, I jumped for joy. MacBooks + Roomba = love? Hacking Roomba has written a Perl script that allows you to control your Roomba by using a MacBook's (or in their case, a MacBook Pro's) Sudden Motion Sensor (SMS). Yes, this means that you'll be waving your laptop around—hope you have insurance on that thing.

First, you'll need a few things. You need a Bluetooth adapter for your Roomba, which you can either make yourself or buy from RoombaDevTools for about $100 (oof). After that, you need to download and install AMSTracker by Amit Singh, and finally, you need the Perl script from the fine folks at Hacking Roomba.

This is how it works: AMSTracker is a command-line tool that outputs three columns of axis data from the SMS. The Perl script then translates this axis data into Roomba-specific functions and eventually broadcasts the directions via Bluetooth to the Roomba itself based on how you tilt the MacBook. Read all about the nitty gritty Perl details on the website, of course. Ta da, you have a Roomba controlled by waving your MacBook around like a lunatic!

One question that comes up in the comments is whether this could be taken a step further by using the motion sensors in a Wiimote to control the Roomba, through the MacBook. A bit convoluted, but intriguing nonetheless. However, not to kill everybody's fun, but couldn't we also just eliminate that whole "waving the MacBook around" part and just write a script that would allow us to control the Roomba based on user-inputted commands? And to go one step further than that, hook that script up to a web interface, and thus, be able to control my Roomba's direct path while not even being at home?

I'm absolutely sure that all of this has been thought of before, but the possibilities are endless!