PDA

View Full Version : Syntax



kandhariakhil
03-21-2014, 11:25 AM
Hi, Im very very new to the world of programming. If some one could help me with the various syntax used to work with the dynamixel motors using an Arbotix M. I'm not aware of the basic syntax used to change the position of a motor or get various datas. If I could get an idea of the syntax I should use to play with these motors I would really appreciate the help. I'm aware of basic arduino codes but apart from the set.position syntax do not know much. Please help and thanks in advance..

KevinO
03-21-2014, 12:53 PM
Did you look at any of the sample code on the http://learn.trossenrobotics.com/ site? Take a look at any of their arm projects or turret products for examples.

kgranat
03-21-2014, 05:07 PM
As kevin mentioned, the Robot Turret pages are a good place to start
http://learn.trossenrobotics.com/12-interbotix/robot-turrets/phantomx-robot-turret/77-phantomx-robot-turret-direct-control-joystick.html

I'm writing an article with some examples of setting and getting data, I'll post a link when it's up.

Until then I would take a look at the ax12.h file in libraries/Bioloid/ax12.h

Especially these 3 functions

int ax12GetRegister(int id, int regstart, int length); //get data from DYNAMIXEL register
void ax12SetRegister(int id, int regstart, int data);//set 1 byte to DYNAMIXEL register

void ax12SetRegister2(int id, int regstart, int data);//set 2 bytes to DYNAMIXEL register

and look at the different #defines to see what register you want to send/get data from. Looking at the manual for your servo also has more information about each register.

What servos are you using?

kandhariakhil
03-22-2014, 02:45 AM
Thank you so much for the replies I'm using the dynamixel MX 64 with a CM 9.04 or arbotix M controller..