I was completely new to custom robotics and I wanted to get ‘servos spinnin’ as quickly as possible. I heard a lot about Arduino on Kickstarter and after watching the Trossen Robotics youtube channel, I realized Arbotix would be a good place to start. Days turned into months ordering and reordering all the necessary hardware and getting it delivered to DUMBO. But meanwhile, I started setting up my development environment. I had just bumped up my macbookpro6,2 to 8gb ram, so the “ROS Groovy Galapagos” virtual machine turned out to be a good choice.
Buy the Hardware
You will need the following hardware which will cost about $250 new:
- Pololu USB AVR Programmer
- 2 paired XBee modules
- XBee Explorer USB + mini USB cable -OR- XBee Explorer Dongle
- Barrel Jack Female Pigtail Lead 2.1 – 5.5mm
- 12v 5amp Power Supply
- 2.5/5.5mm Power Jack Adapter
- USB M-F Extension Cable
Setup Your Development Environment
- Install VirtualBox + Oracle VM VirtualBox Extension Pack
- On Windows: Install Pololu USB AVR Programmer Driver and make sure it’s on COM1, 2, 3, or 4 (this can be managed in Device Manager)
- On OSX: Plug in your Pololu USB AVR Programmer. You will see a green solid and red flashing light. In Terminal, type “ls /dev/tty.*”. You will see something like tty.usbmodem00041261. The one with the lower number is your programming port.
- Import ROS Groovy Ubuntu appliance
- ROS Ubuntu > Settings > Ports > Enable Serial Port > Mode: Host Device, Path: /dev/tty.usbmodem00041261
- Start the virtual machine — from now on we will be working in our new Ubuntu virtual machine
- Click Devices > Install Guest Additions
- Open “Ubuntu Software Center”
- Search for “arbotix” and install all software
- Search for “putty” and install putty ssh client
- Search for “arduino” and install 1.0.0
- Download Arduino IDE 1.0.4 (you need to install the old version using Ubuntu Software Center to get the dependencies) As of this writing, the Arbotix driver is not supported in Arduino IDE 1.5 BETA.
- Download and extract arbotix archive to the Desktop
- Copy the contents of the arbotix folder to Home > sketchbook
- Run Arduino IDE
- Tools > Board > ArbotiX
- Tools > Programmer > AVRISP mkII (serial)
- Tools > Serial Port > /dev/ttyS0 (if your Pololu is on COM1 in Windows)
- Now let’s test that we are able to upload a sketch to the Arbotix. Open the Blink example sketch.
File > Examples > Basics > Blink
- The Arbotix has an LED on pin 0 — not pin 13. So, fix the code appropriately and save to your “Sketchbook” folder.
- File > Upload Using Programmer
Get Your Servos Spinning