3 June 07
This weekend I made my first forays into robotics. I’ve been reading a lot in preparation:
- Joseph L. Jones’ Robot Programming,
- David Cook’s Robot Building for Beginners (the companion volume is sitting on the coffee table), and of necessity...
- a C reference
The options would have been to start at RadioShack, and do a bread-board robot from the Cook, or to get an iRobot Create and start hacking.
Soldering or Hacking?
My software skills are sharper than my hardware skills, so I thought I’d start with Create kit, and build circuits for a later project.
(From a pedagogical perspective, if I were teaching this to kids, I might do it the same way. There’s a lot of instant gratification to be had with the iRobot kit. It beeps and twirls, and interfacing with the LEDs is really easy. Staying motivated is not a challenge.)
I hate Vista
I’m not a Windows guy. I run Ubuntu at work, and use an iBook at home. I can use Windows machines, but I don’t enjoy it.
The iRobot kit comes with WinAVR, a C compiler for the Atmel® ATMega168 microcontroller in the robot, and it’s Windows only. Yes, I could probably have found an avr-gcc port for my Mac, but installing a C compiler from source is not how I wanted to spend the weekend.
Getting everything working on my Vista laptop only took about five and a half hours.
The iRobot kit comes with a CD that has USB drivers for talking to the robot’s command module. Those didn’t want to install under Vista.
Making it Work
Here’s what I wound up doing:
- Downloaded the latest version of libusb for windows. The filter package was bad news and caused serious problems. The driver package had what I needed (more on this shortly).
- Installed the iRobot USB drivers from the CD
- I Copied the file libusb0.dll from the bin directory in the libusb driver package that I’d downloaded, into the C:\Windows\System32 directory, replacing the existing file. (This was to fix a problem I had with WinAVR software trying to communicate over USB.)
- I did not use the WinAVR install that came on the iRobot CD. That gave me the error "avr-gcc installation problem, cannot exec cc1". The latest WinAVR release worked much better.
I had tons of problems getting the iRobot Create USB drivers and the WinAVR software working under Vista, but the steps I’ve outlined above are (I think) what got all my problems solved.
In the next article... my first piece of robot code.
