Linux Serial Port and Roboteq Library

16 years 6 months ago #12996139 by Camel85kv
Linux Serial Port and Roboteq Library was created by Camel85kv
I've used the AX3500 for a couple different Linux-based robotics projects, such as web.mit.edu/kvogt/www/wheelchair.html and tourbot.mit.edu/index.php/Main_Page and I have quite a bit of serial port code I'm willing to release. It's on my personal website as a part of my Open Source Robot Controls libraries. I have written the shell of a fully-featured Roboteq library.

I think this is a necessary extension to the Roboteq product should help others use it in a Linux environment. To use my code, you need these files (available at web.mit.edu/kvogt/Public/osrc/ in the "src" and "include" folders):

roboteq.cpp
roboteq.h
serial.cpp
serial.h

Then, using the motor controller is as simple as putting the following lines in your C++ file and compiling it using GCC or something similar:

#include "../include/roboteq.h"

void main() {
Roboteq ax3500; // Creates an instance of the Roboteq class
ax3500.dev = "/dev/ttyS0"; // Name of serial port used
ax3500.connect(); // Connects to the Roboteq
ax3500.setSpeed(1, DIRECTION_FORWARD, 50); // Go FORWARD at speed 50
}

This was a quick example, but there is more documentation at web.mit.edu/kvogt/Public/osrc/doc/html/ (Click on "Class List", then "Serial" or "Roboteq") There are also a few applications I've written that use the Roboteq and a sample makefile in the code folder listed above that may be useful. Note: Not all functions listed in the documentation are implemented yet, but it should be trivial to fill in the functions that I haven't written.

The Serial class can be used by itself, and is much more complete than the Roboteq class. If you have trouble with the Roboteq class, just use the Serial class and write your own wrapper for the Roboteq. Please send me an email if you found this to be useful!

Thanks,
Kyle Vogt
web.mit.edu/kvogt/www

*** EDIT: Added a page dedicated to this library at web.mit.edu/kvogt/www/roboteq.html ***

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.052 seconds