My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for

ArbotiX RoboController

Home

Hardware

Software

Examples

  • IssyDunnYet
  • Droid
  • Ranging Sensors
  • I2C Sensors
  • DiffDrive

Other

GettingSetup  
how to set stuff up
Updated Apr 5, 2012 by MFergs7@gmail.com

This page details software and hardware setup. This will take a few steps, but then you'll be set up to use your ArbotiX:

  • Install Arduino Software - the IDE for creating code for our controller.
  • Install ArbotiX Distribution - we'll also need to install some files to use the ArbotiX with the Arduino IDE.
  • Setup an ISP or FTDI Cable so you can download code onto your ArbotiX.
  • Learn About The Connectors and how to apply power to your board
  • Test Your Setup and update pypose sketch at the same time.
  • Install PyPose - A simple pose and capture program for the ArbotiX.

Arduino Software Setup

Arduino is an open-source electronics prototyping platform based on flexible,
easy-to-use hardware and software. -- arduino.cc

The ArbotiX software is based on the Sanguino, the big brother of the Arduino. The first thing we need to do is to install the Arduino software:

  1. Install the Arduino framework: follow the instructions at http://arduino.cc/en/Guide/HomePage to install Arduino 0018.

The rest of this document assumes familiarity with the Arduino environment. See the Arduino documents for details on using the Arduino IDE.

NOTE: If you install Arduino using apt-get on an Ubuntu Linux machine, you will have to edit your boards.txt file, see this thread at TRC for details.

ArbotiX Software Setup

To use the ArbotiX with the Arduino IDE we need to add some files to our Arduino folder. Most users will want to download the latest ArbotiX/PyPose release from the front page, extract the zip file, and do the following:

  1. Create a hardware folder in your Arduino sketchbook directory if it doesn't already exist
  2. Copy the arbotix folder from the release into the hardware folder of your sketchbook directory
  3. Copy the libraries folder from the release into your sketchbook directory.
    • These are just the special libraries for the ArbotiX, you'll also want to install the robocontroller library for even more functionality.
  4. You may also want to copy the folders in sketches, especially pypose, into your sketchbook directory

NOTE: Some users have reported problems with installing files into their sketchbook. If the instructions above are not working, try installing the libraries and hardware/arbotix folders into your arduino-0018 folder.

Alternatively you can checkout the absolute latest, bleeding edge source from our SVN repository, and then locate the files correctly as described above.

Programmer Setup

NOTE: An ISP (in-system programmer) is only used to upload code! It does not act as a serial port (i.e. for Serial.println()). You must use an FTDI cable or XBEE pair for serial data transmission

If you plan to use an FTDI cable, you don't need to do this section. Please Note: An FTDI cable should not be connected at the same time as an XBEE radio is in the board. Always remove the XBEE radio before connecting an FTDI cable

Pololu ISP If you want to use the Pololu ISP, open the file boards.txt found in your sketchbook/hardware/arbotix folder and follow the directions to change from the FTDI to ISP configuration. You also need to create a file called programmers.txt in your sketchbook/hardware/arbotix directory, and copy the following in:

avrispmkii.name=AVRISP mkII (ArbotiX)
avrispmkii.communication=serial
avrispmkii.protocol=stk500v2

Under Linux, the newer Pololu ISP uses a new style of USB port, which appears as /dev/ttyACMx, which is not found by the Arduino environment. The easiest fix for this is to create a soft link from /dev/ttyS1 -> /dev/ttyACM0 assuming you have no ttyS1.

USBTiny If you want to use the USBTinyISP open the same boards.txt file and follow the directions, but change avrispmkii to usbtinyisp. You'll also need to add the following to your sketchbook/hardware/arbotix/programmers.txt file:

usbtinyisp.name=USBtinyISP (ArbotiX)
usbtinyisp.protocol=usbtiny

Wireless Downloading

With a bootloader on the ArbotiX, you can do wireless downloading. The arbotiX bootloader runs at a 38400 baud rate, so your XBEE radios need to be set to 38400 for wireless downloading. You'll also have to manually push the RESET button. A tutorial on getting around the reset button push is here: http://www.ladyada.net/make/xbee/arduino.html

Note: wireless bootloading is dangerous, if you experience RF-interference something may go wrong. We do not recommend doing this unless you have an ISP to restore the bootloader, and also have enough experience to know how to restore the bootloader.

Connecting Power, Etc

Please see the downloadable ArbotiX manual for instructions and guidance in connecting external devices and power to the board. Although all boards ship with the pypose sketch already installed, we recommend always upgrading to the newest version, in case changes have been made since your board was produced.

See the RX-Bridge page for details on setting up an RX Bridge.

Upload PyPose Sketch

Now, let's test our Arduino installation and programmer. Before PyPose can interact with our robot, we need to download a program (or a sketch as the Arduino environment calls them) onto the arbotiX. This sketch is called "pypose", and can be found in the examples folder of the arbotiX distribution. It provides a pass through from the arbotiX to the Bioloid bus, by speaking the correct protocol with PyPose.

Copy the sketches/pypose folder into your sketchbook, and open the sketch. Restart the Arduino IDE if it was already open. From the Tools -> Board menu, select ArbotiX board to make sure all went well above. Connect your board via either the ISP or FTDI cable, select the correct port, open the pypose sketch, and download it. While we ship each board with a version of pypose installed, it may not be the latest (in fact, it almost never is, since by the time the board gets to you, we've made PyPose better!)

Any time you load your own code onto the board, it will overwrite the pypose sketch, so you'll have to upload it before using pypose again.

PyPose Setup

PyPose is a pose and capture program, written in Python using wxPython. We of course will have to install Python, wxPython, PySerial to access serial ports, and then PyPose itself.

  1. Download and install Python 2.x: http://www.python.org/download/releases/
  2. Download and install wxPython: http://www.wxpython.org/download.php
  3. Download and install PySerial: http://sourceforge.net/projects/pyserial/files/
  4. Put the PyPose software in an easy to use location, and start pypose.py to run PyPose.

If using Ubuntu, you can install items 1-3 of the above with: sudo apt-get install python python-serial python-wxgtk2.8.

Connect with PyPose

PyPose communicates over a serial link to the board, either through an FTDI cable or XBEEs. If using XBEEs, they must be set to 38400, and should be paired. See the XBEE tutorial on TRC for details:

Congratulations, your ArbotiX and PyPose are setup! Now you can go to the PyPose documentation page to start interacting with your robot.


Sign in to add a comment
Powered by Google Project Hosting