Archive for June, 2006

Sketching in Hardware: USB on Rails

Posted by todbot on June 26th, 2006

I gave a talk at the Sketching in Hardware 1 conference. It was a great conference, full of amazing people and hosted at an astounding location. I’ll write more on the conference later.

My talk was “USB on Rails”. The USB HID standard enables the sending and receiving of arbitrary data-structures (”objects”) between a host PC and a device. All without any additional device drivers, since the HID driver is built in to all OSs. Many sketching tools or demos use USB, but introducing them to the unintiated means lots of reboots for driver installs. The title is a silly, but half-serious, take of applying the philosophy of Rails to hardware-to-computer interfacing: solve the common case simply, but allow deviations. More on this later, for now, here’s my talk’s slides:


usbonrails-intro-small.jpg

SpiroExplorer, a Spirograph toy

Posted by todbot on June 3rd, 2006

So I’ve written a tool that can turn any parametric equation into a series of Roomba movement commands. Mostly, anyway. The parametric equations I’m predominately focusing on are the hypotrochoid series of equations used in a Spirograph.

To explore the space of hypotrochoid curves I created SpiroExplorer, a simple Processing applet that lets you to adjust the equation parameters in real-time. You can do the following things while it’s drawing:

- left/right arrows change “r”, the radius of the inner moving circle
- up/down arrows change “d”, the pen’s distance from center of the moving circle
- ,/. changes “R”, the radius of the big fixed outer circle
- +/- changes scale
- [/] changes “dtheta”, the increment size (resolution, essentially)
- space bar randomizes parameters
- return key clears the screen

Click the below to play with SpiroExplorer:

spiroexplorer

RoombaComm library, release 0.95

Posted by todbot on June 1st, 2006

RoombaComm is Java library for communicating and controlling the Roomba. It works on any operating system that RXTX supports. This includes Mac OS X, Linux, and Windows. It also works with Processing. It will soon work with Flash and Max/MSP.

It’s been a work in progress for several months and has gotten a little better as I work through improving it for the book.

Several bugs have been fixed, particularly with respect to Bluetooth on Windows. See the README for some info on that.

Tested systems:
- Mac OS X 10.4 (Tiger) : usb serial & bluetooth
- Mac OS X 10.3 (Panther) : usb serial & bluetooth
- Windows 2000 : usb serial & bluetooth
- Gumstix Linux : built-in serial

Tested adapters:
- Homemade RS-232 adapter
- Homemade Bluetooth adapter
- RooStick USB adapter

Demo command-line programs include:
- DriveRealTime — Drive your Roomba with cursor keys
- RTTTLPlay — Play monophonic ringtones on your Roomba
- Spiral — Roomba drives in ever expanding spiral
- Waggle — Roomba wags like a dog
- BumpTurn — Roomba drives around by itself, avoiding things
- Spy — Read your Roomba’s mind while it works
- Tribble — Roomba purrs and sometimes barks
- RoombaCommTest — Roomba GUI remote control panel (not command-line)

Processing demos include:
- RoombaTune — Play your Roomba like a musical instrument
- RoombaRing — Play RTTTL ringtones on a Roomba
- RoombaView — Full instrument panel and remote control

This is what RoombaView looks like:

roombaview

Download:
- full package: roombacomm-0.95.zip
- Processing library: roombacomm-processing-0.95.zip

Docs:
- javadoc
- README-0.95
- the source tree

Epicyclic Processing Triptych

Posted by todbot on June 1st, 2006

I’ve been playing around with Processing in order to visualize complex Roomba movements but instead have been having making little graphics programs that amuse me.

Thus the below. Click on each on to start it going.

drunk spiro

gummigiger

gibspiral

I guess this is generative art, but mostly it feels like wanking to me. Lots of fun, but still.