In this guide you will learn how to setup and program your Arbotix-M Robocontroller. Because this is a Quick-Start guide, we will leave out many of the details and intricacies of the ArbotiX-M Robocontroller. To learn more, check out the ArbotiX-M Documentation or keep a look out for this symbol
which will take you to a page with more information on the topic.
This guide is designed around the ArbotiX-M Robocontroller, however the setup instructions for the original ArbotiX Robocontroller are almost identical. This guide will work for the original ArbotiX, and it will note any differences.
The main parts of setting up the ArbotiX-M are as follows:
- Install the Arduino IDE
- Install the FTDI drivers
- Install the ArbotiX-M Hardware and Library Files
- Connect your ArbotiX-M Robocontroller
- Program the ArbotiX-M Robocontroller
Once you have installed the Arduino IDE, open the program. This will generate an 'Arduino' User Folder that you will use in Step 3. here, and a guide to installing them here.
Note: Windows users can download the the drivers and install them through the windows hardware wizard, or click on the 'setup executable' link automate the process.
For the Arduino IDE to support the ArbotiX-M, we'll need to add files into the Arduino user folder. Click here to download the needed ArbotiX-M Library and Hardware Files
In this .zip file, there will be 3 folders
- hardware-this folder contains all of the hardware definitions that will allow the Arduino IDE to build programs for the ATMega644p on the ArbotiX-M. This folder also contains definitions for the AVRSTK500 serial programmer.
- libraries-this folder contains libraries that will help you use the ArbotiX-M to its full potential. Many of these libraries will be required to compile the programs for InterbotiX robots. Click here for more information on the individual ArbotiX-M Libraries.
- ArbotiX Sketches-this folder contains test code and sample code for various ArbotiX-M projects and InterbotiX robots.
Where '~' represents the path to your user account.
If you're having trouble finding your 'Arduino' folder, open the Arduino IDE and open the 'Preferences' panel (File->Preferences). Here you will find a file path under 'Sketchbook location:'. This is the path to your 'Arduino' folder.
When you are done, your file path should look like this
If you aleady have a library or hardware folder, simply copy the contents of the ArbotiX-M Libary/Hardware folder into the library/hardware folder in your 'Arduino' folder.Your folder structure should look like the one shown above, along with your pre-installed files.
Now open the Arduino IDE. You should see the following options
'Sketch->Import Library->'you should see
Commanderamong other libraries
'Tools->Board->'you should see
ArbotiX w/ RX Shieldat the top of the list
'Tools->Programmer->'you should see
AVR ISP mkII(Serial)
If all of these are available, then your Arduino IDE is setup and ready to program the ArbotiX-M!
- In this example we will power the ArbotiX-M from the FTDI port. Move the power jumper so that it connects the middle pin and the 'USB' pin ('FTDI' for the original ArbotiX).
Power Jumper for ArbotiX-M Power Jumper for ArbotiX
- The orientation of the FTDI cable is very important - it is possible to plug in the cable backwards and you will not be able to program your board. The top FTDI pin with the mark 'BLK' will always connect to the black FTDI cable. This pin is a ground or 'GND' pin. The bottom pin with the mark 'GRN' will always connect to the Green FTDI cable.Click here to learn more about powering the ArbotiX-M
- If you are using the UartSBee, the 'BLK' and 'GRN' marking are on the underside of the board.
- If you are using a UartSBee, make sure that the switch is set to '5v' so that the unit is running at 5v like the ArbotiX-M
- Click here to learn about more options to program the ArbotiX-M
|ArbotiX-M to UartSBee Connection||ArbotiX to UartSBee Connection|
|ArbotiX-M to FTDI-USB Connection||ArbotiX to FTDI-USB Connection|
Now that your ArbotiX-M is hooked up to your computer, you will need to pick the
ArbotiX board from the boards menu. Select the proper board:
Tools->Board ->ArbotiXNow pick the serial port. Go to
Tools ->Serial Portand pick the serial port for the FTDI device.
- If you have multiple serial ports and you are not sure which one is the ArbotiX-M, unplug the FTDI device from the computer, and watch which one dissapears.
- Mac and Linux users may have 2 ports - one marked 'cu.' and one marked 'tty.' Either will work.
Once you have set the board and serial port, you can open the 'ArbotixBlink' sketch.
File -> Sketchbook -> ArbotiX Sketches -> Test Sketchs -> ArbotiXBlinkClick on the 'Verify Button (the green check in the upper left). This will attempt to compile the sketch. If all of the software is installed properly you will see a 'Done Compiling' below.
Click on the 'Upload' button (the green arrow button next to the verify button). This will compile the sketch, and then load it onto the ArbotiX-M. If the hardware is connected properly you will see the green user light flicker while the Arduino IDE displays an 'Uploading' message. When the Arduino IDE displays 'Done Uploading' the user LED should blink on and off in a 1 second interval.
Congratulations, you just programmed your ArbotiX-M Board!
Move the power jumper towards 'VIN'. This allow you to power the ArbotiX-M from the external power supply.
|Power Jumper for ArbotiX-M||Power Jumper for ArbotiX|
Next, connect your servo to the ArbotiX-M Robocontroller with a 3-pin DYNAMIXEL cable. All three DYNAMIXEL ports on the ArbotiX-M are identical, so you can plug the servo into any of them. Note: This example assumes that you are using a new AX-12A or AX-18A. All new AX servos are set to ID #1, which this example will target. This example is not intended for MX servos or servos set to IDs other than '1'.
Now you will need to connect an external power supply to the ArbotiX-M board. In this example we'll be using a 12v Switched Mode Power Supply connected to the Arbotix's power terminals through a Barrel Jack Pigtail.
|Single Servo Setup for ArbotiX-M||Single Servo Setup for ArbotiX|
Now load the following sketch onto the ArbotiX-M Robocontroller
File -> Sketchbook -> ArbotiX Sketches -> Test Sketchs -> AXSimpleTest
The servo should now begin to rotate counter clockwise, then clockwise. It will repeat this behavior until you power off the ArbotiX-M or re-program it.