PDA

View Full Version : Trouble compiling PhantomX Hexapod Sketch



Gilrock
01-31-2011, 09:40 AM
I recently purchased the PhantomX Hexapod AX12+ kit and I'm trying to get the sketch I downloaded from the products web page to compile. I've done Atmel AVR firmware for several years but only using AVR Studio so I'm new to using the Arduino software. I have arduino-0022 installed and I downloaded the arbotix-0013. I made the arbotix folder my default sketch folder so that the libraries could be directly imported in Arduino and the sketches would show up in the flyout menu.

I'm going from memory here but the compile errors were all from the ax12.cpp file not finding several register definitions like "UCSR1B". I recognize that as one of the standard definitions for a register in an Atmel AVR processor...serial port I think. So I'm not sure if I missed adding a library into the Arduino directories or what.

I see this line in ax12.cpp:
#include "wiring.h" // we need this for the serial port defines
It looks like this would have been the file to contain the missing definitions but I don't think I got this file with anything I downloaded for the Arbotix or PhantomX Hexapod code.

Thanks,
Gil

lnxfergy
01-31-2011, 09:45 AM
Did you select the "arbotix" from the drop down menu as your board type in the Arduino IDE? (the default Arduino boards wouldn't have this register, which is the most likely cause of issues if you have a correct installation)

-Fergs

DresnerRobotics
01-31-2011, 10:05 AM
The Arbotix should be pre-programmed btw!

Gilrock
01-31-2011, 10:16 AM
No I didn't...that must be it. I'll try that when I get home tonight.

The only other time I've used the Arduino software was for a sumo I started building for a robotics club at work. It has an ATMega328 and I know I've compiled/downloaded sketches into that. I had help setting up the Arduino software so I don't remember what it was set to.

Thanks,
Gil

Gilrock
01-31-2011, 10:19 AM
The Arbotix should be pre-programmed btw!

Oh yeah it's already programmed and working great. But my son and I are interested in trying to learn how to use PyPose and make it do other moves so I was trying to compile the original code as a starting point. Plus I wanted to make sure I can program it back to original if we screw it up. :)

Thanks,
Gil

DresnerRobotics
01-31-2011, 10:21 AM
Oh yeah it's already programmed and working great. But my son and I are interested in trying to learn how to use PyPose and make it do other moves so I was trying to compile the original code as a starting point. Plus I wanted to make sure I can program it back to original if we screw it up. :)

Thanks,
Gil

That's great to hear, just wanted to make sure you knew that the software setup wasn't holding you back.

jes1510
01-31-2011, 11:22 AM
I assume you set up the Arduino IDE as described here:
http://code.google.com/p/arbotix/wiki/GettingSetup

Gilrock
01-31-2011, 11:50 AM
Yeah I need to go over that setup page again. I think I skipped over the Arduino section because I already had it installed. I lost my internet at home all day yesterday so I couldn't research what I had done wrong.

Thanks,
Gil