So the Raspberry Pi blog points us to a project by Andrey Chilikin.
This is what happens when you are innovative enough to turn one of those antique computer-cup-holders on its end and add that standby of makers everywhere, the trusty lollipop stick. Hook it up to the Raspberry Pi’s GPIO pins, and Bob’s your uncle.
Andrey’s GitHub contains all the code you need and he shows motor driver and I/O schematics. There’s also Python code to support remote debugging.