Sunday, April 30, 2006

Programming the VEX

I cracked open the VEX EasyC programming kit today that I got at the local Radio Shack, and read the manual. Super short and simple. It left me feeling that likely I will need to find some other way (beyond the drag and drop interface) to program the controller, given the complexity of what I want to do. I'm not 100% sure of this, but unless I can inline my own C code within the drag and drop code, it probably is not going to be a powerful-enough toolchain. It sure looks well-designed, regardless.

I did see some mention on the vexlabs site that there is an alternate controller module that may be more conducive to being programmed in the clear. I'll need to look into this further, all they offered was a "call us at xxx-xxx-xxxx for more information". Would have been nice to find the nitty-gritty details online.

I posted the following to the vexlabs online forum moments ago:

What I would like to do is interface VEX with a Linux-based SBC that hosts an AI
engine (I've purchased 2 starter kits with the idea of using VEX as a basis for
doing swarm robotics experiments, and I plan on having the bots talk to each other
over 802.11, and host video cameras, which is another reason I feel the need to
offload to a more general purpose environment). I'd simply like the VEX controller
to send to the SBC any sensor inputs it gathers, and I would like the SBC, in turn,
to be able to send commands to the VEX controller to drive motors.

As a C programmer with a MS degree in Computer Science and 20 years of experience,
I don't have any problems with the programming of the AI engine, or design of a
command language that would be used to perform the communication. What I am wondering
is over what interface the communication will occur. Can code hosted on the VEX read
the serial port that is used to download programs from the EasyC software? Or is
there some other recommendation for interfacing to a secondary controller?

Any API details or sample code for dealing with the serial port would be appreciated;
I saw nothing in the programming kit to help me with this question. I'm guessing that
the USB to serial cable to "whatever that black box is" to the RJ connector interface
could be driven easily from the SBC side (I plan to experiment with that soon); it's
the other end of the pipe (the VEX end) that I really am lacking information about.

Anyone who is not aware of swarm intelligence can look up the term on,
or go to Also check out my blog at


We'll see what kind of responses I get. I'm hopeful there is a good solution (but not overly so :-)

Oh, and it looks like the vexlabs people got back control of VEX from Radio Shack. Probably best for VEX, long-term. Though losing such a big distribution channel had to be a disappointment (both to Tandy and vexlabs).


Post a Comment

<< Home