|
GettingSetup
how to set stuff up
This page details software and hardware setup. This will take a few steps, but then you'll be set up to use your ArbotiX:
Arduino Software SetupArduino 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:
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 SetupTo 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:
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 SetupNOTE: 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 DownloadingWith 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, EtcPlease 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 SketchNow, 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 SetupPyPose 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.
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 PyPosePyPose 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. | |