Hi Ricardo, AX12 is the name of the object and its methods are: ping, move, movespeed, etc.so that all instructions start with AX12, for example:

Ax12.ledStatus (1,ON); // This function sends USART data necessary to turn on the LED of servo with ID 1.

#include "Dynamixel.h" // Include the Dynamixel Library

void setup(){ // Configuration

Ax12.begin(1000000,2); // Configure the usart at 1mbps // The digital pin 2 will make the switch from tx to rx}

void loop(){

Ax12.move(1,random(200,800)); // Move the servo with ID 1// to a random position between 200 and 800// Ax12.move(1,Position); Position from 0 to 1023 Resolution

delay(1000);

Ax12.moveSpeed(1,random(160,860),random(256,1023));// Move the servo with ID 1 // at a random position and speed.// Ax12.move(1,Position,Speed); Position and Speed from 0 to 1023 Resolutiondelay(1000); }

Ax12.begin(1000000,4); // Configure the usart at 1mbps// The digital pin 2 will make the switch from tx to rx}

void loop(){

Ax12.move(9,random(200,800)); // Move the servo with ID 1// to a random position between 200 and 800// Ax12.move(1,Position); Position from 0 to 1023 Resolution

delay(1000);

Ax12.moveSpeed(9,random(160,860),random(256,1023));// Move the servo with ID 1// at a random position and speed.// Ax12.move(1,Position,Speed); Position and Speed from 0 to 1023 Resolutiondelay(1000);}

Hi Savage, could u please show an example about how to change dynamixel´s ID? I mean the hole code.... ´couse am a dummy with this kind of things... kidding, am usually good at it but... thanks for it!

Hello, I am currently having trouble with the Arduino Duemilanove (ATMEGA328). The Arduino is connected to a servo motor (Dynamixel AX-12+) and I'm trying to communicate between the servo motor and pc via the USB port. However, there is a conflict between the libraries causing error compiling. I'm using Arduino-0022 compiler.

The error is as follows: core.a(HardwareSerial.cpp.o): In function `__vector_18':C:\arduino-0022\hardware\arduino\cores\arduino/HardwareSerial.cpp:81: multiple definition of `__vector_18'Dynamixel\Dynamixel.cpp.o:C:\arduino-0022\libraries\Dynamixel/Dynamixel.cpp:45: first defined here

Hi, Ok Note that you can't use the Dynamixel Library and the HardwareSerial Library at the same sketch, cause the Dynamixel.h already use the Serial port. If you use the Ax12.begin(); you can not use the Serial.begin(); cause is the same Serial port, but if you want to comunicate with computer you can use the NewSoftSerial with the digital pins of the arduino and a FTDI Chip. :P

Thanks for your answer.I've find out more about the FTDI chip. That's a good way to deal with this. But I would like to find the way to solve this by software.

Is it possible to make Dynamixel.h communicate with the motor through other pins by using NewSoftSerial? (As I understand, NewSoftSerial makes other pins work as Rx and Tx pins.) If yes, where should we modify the library? I don't have knowledge in C++, but I can do C and some JAVA.

Hi, yes you can modify the Dynamixel.h to use NewSoftSerial but the NewSoftSerial works with 115200bps Max and the Servo works at 1Mbps, you can slow down the servo speed to 115200bps but it has an error of 2.124% of the USART comunication. To modify the library replace every usart_write, usart_read, usart_peek and usart_available for the NewSoftSerial Objet and method. Example:

NewSoftSerial NewSerial(4,3);

usart_write to NewSerial.write, usart_read to NewSerial.readAnd delete this in the Dynamixel.h:

Ax12Class constructor and de usart_write(); usart_read(); …. methods.

If you want i can modify the library for that configurations and i will uploded rigth away. (one or two days).

Any time you “use” an object by calling its begin(), available(), read(), or print[ln]() methods, it becomes the “active” object, and the previously active object is deactivated and its RX buffer discarded. An important point here is that object.available() always returns 0 unless object is already active. This means that you can’t write code like this:void loop(){ if (device1.available() > 0) { int c = device1.read(); ... } if (device2.available() > 0) { int c = device2.read(); ... }}This code will never do anything but activate one device after the other.When I replaced usart_read() by NewSerial.read(), the code looks like the above.

Can you help me modify the library, please? I still don't understand about the addresses and variables used in the library.Thank you very much.Veerachart

Our earlier code that didn't use the SoftwareSerial, we used Ax12.begin(1000000,2); and the servo moves. However, as we used your code here, the output "Sending Data to PC and making the servo moves" is printed out, however the servo doesn't actually move. Could this be due to a possibilty that the speed isn't high enough for the servo to turn? and if so, what did you implement further to create such a movement at a lower speed?

Yes in the previous code it was 1Mbps (1000000 bps), but SoftwareSerial only accepts baud rates lower than 115200, so you should modify the servo speed as i do change to 9600bps and just then the servo will move with SoftwareSerial Library. You can change the baud rate of the servo with the previous library with this lines:

Hi Savage,great work with the library but i hit a problem. I changed the baud rate with the folowing code as you sugested so i could use it with the new v2 library but my motor then became unresponsive.

Hi, yes 207 is 9600bps according with AX-12 Manual you can turn it back with the Dynamixel Configurator, just short the rx and tx of the arduino and connect to the Servo also share the grounds from the arduino and the servo source power.

Is there any way to turn the baud rate back to 1000000 without the Dynamixel Configurator(you ment the USB2Dynamixel?)? I'd prefer if I didn't have to buy the Configurator. I have tryed everything. I connected everything as you said and it still doesn't work. When I plug the power to the servo the LED briefly lights up and that is it. I even tryed int Error = Ax12.setBD(1,1) and int Error = Ax12.setBD(1,207)but I keep geting -1.

Yo dont have to buy anything, Arduino works like the USB2Dynamixel yo just have to download the Dynamixel Configurator.exe and then try to find the baud rate and returned to 1Mbps. If you have troubles with that i will try to make a program to reset the servo. Good Luck.

Tryed the code but it doesn't work. I found some forum threadhttp://forum.crustcrawler.com/phpBB3/viewtopic.php?f=12&t=1263http://www.robotis.com/xe/qna_en/21779http://robosavvy.com/forum/viewtopic.php?t=3719&sid=8662c017d2038e743ef53d9bb67cc20c

telking about how to hard reset the servo but I can't seem to conect properly with the arduino. The thing is I have to start a Serial connection at a speed of 57600 and start sending a # character and then plug in the power to the motor. In the first 200ms of powering up, the servo can enter something like a BIOS mode where it can be reset. Could you maybe write up some code that can do that? :-)

Ok, i will probe that method with one of my servos, but i think you should try again with the last program, download again the Dynamixel Library, Replace it, Check your power source for the motor, it should be around 10v and then conect the motor to tx of the arduino and share the grounds.

You don't have to buy it, the arduino can totally replace it, the arduino interface is almost the same of the USB2Dynamixel, maybe you are not connecting thing right, let me do a tutorial and then if the problem don't get solved then you can buy the USB2Dynamixel.

Hello it's me again. I tryed again with your code and reworked it a little bit. Also I added a transistor to switch the motor on and off. I'm using a Arduino Mega so I have Serial1 TX for the outgoing messages and Serial2 RX for receiveing the messages. I'm using this setup becase the code stalled if I had boath read/write on Serial1.Here is the code:

This is what I get in the terminal wondow:#########################I received: #¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ä

Any ideas? I'm kind of weary to use a functioning motor to test the code because I don't want to risk blocking it too. Also I forgot to mention before that I'm not using a SN54/74LS241 with the arduino. Could this be the problem?

If you use a transistor in pin 7 to the servo thats not necessary cause we are sending ground. Maybe the SN54/74LS241 will help to understand the received data but i don't think thats a problem. Do you have an Avrisp, Avr Dragon or so, you may copy the program of a functional servo and burned in the unresponsive one.

Ok, but the arduinos with optiboot can't work as an ISP ( Check the version of your arduino ).Inside the servo there's a micro controller ATmega8 copy the hex file of that micro and burned on the unresponsive one. There's a photo of the servo micro:http://www.bioloid.info/tiki/tiki-index.php?page=AX-12+page

Thank you for the lib. I am trying to port it to the Mega (ADK) board, and downloaded the Serial2 version. It appears to work great for sending data to AX-12, but anytime I try to receive, like pink I get error = -1. Any tips? Thanks you.

Hi, Ben, The -1 means that the arduino didn’t get any response from de servo, de control pins is to decide if the arduino is going to send data or received, if you want to read the incoming data(servo to arduino) you will have to use the 74ls241 and the control pin begin, and the baud rate of the servo an arduino will have to be less the 200000. Good luck. :D Cheers

Awesome, thanks for the quick reply. Instead of the 74s241 chip I had the HC126 and HC04 hooked up. I was trying to do the 1Mbs baud rate, I 'll try a slower baud rate next. The end goal is to hook up the Arduino ADK board to the AX-12s so we can control our walking MechWarrior with an Android cell phone. We have had no luck hooking up the pyPose either, but we can wire up an Atmega 644 and talk over i2c or something, just trying to consolidate to just the adk board.

What's with the speed limit? Is it the way they implement the buffer in the HardwareSerial.cpp? I see the Arbotix board tried it in their implementation of AX-12 library here

The HC126 & HC04 are just fine.The speed limit its for the Hardware Serial, you will have to modified the HarwareSerial.cpp and HardwareSerial.h just like i do in the first version of the Dynamixel Library, and the PyPose its very easy to do check this, that maybe help you someway.

Well I got it working with your original version of the library that uses the interrupt. Go figure, it was the circuit. The signal was a little noisy on the scope, so I put some capacitors on VCC of the HC126 & HC04 chips and a 10uf electrolytic cap across the motor power. Now on to pyPose, which will probably work now... Thanks for all the help, the code change I made for the Arduino ADK can be found here,

Your code its right maybe the error is in the connections of the Dynamixel and the IC 74LS241, I strongly recommend you to check that cause your code is fine it should work. Check the Diagram of the IC above.

Ok, I’ll check my code again and tested out. Could you tell what arduino are you using and de Version of the IDE and what circuit uses Two Microcontrollers? I will try to solve the problem around 5:00 PM Mexico’s Time and give a solution. Cheers. :D

Hi, i have already check and tested the library and its working fine. Whats the return status of your servo. whats is the servo responding to the readPosition instruction ? -1 or random information. The readVoltage and readTemperature functions works?

if using the above program " b = Ax12.readPosition (6)" ;I use to display additional serial servo position that reads,b result is always "0" in the show in the serial monitor never changed even though the servo in the movements,,if I disconnect the servo from the voltage source and then I plug it back then the value of b = -255 in the show in the serial monitor and then the value of b = 0 again,

you will only need one arduino connected by usb to the computer and opening the terminal.this program do the cast from an int to a string with the function iota(); - > int to ascii. so i have that solve your problem. b gets the value readPosition but Serial.print or in your case mySerial.print(); its not doing the proper cast of b. good luck. :D

///////////////////////////////////////and servo I turn it by hand and the value of b is always 0 (zero) on the display monitor serial and LED pin 13 is never lit if the servo is at position 512 ,how do you view the position servo is usually..

Hi, The position is from around 200 and 900 thats because the servo has an ideal 1024 positions, so you will see in the serial monitor as:ÿÿ458ÿÿ768ÿÿor something like that the symbol ÿÿ is from there serial at 1000000 that can't interpretate in the serial monitor and then the position, thats from the code i wrote before, in your code you’re searching for a 512 position, well that a little hard to get by hand (the exact value of 512), you may do this to make the servo go to 512 an then the led will turn on:

Now the LED should turn ON, remember that the number 1 in Ax12.move(1,512); its the ID of my servo, and the same in the Ax12.readPosition(1); instruction.The printed value of b = 0 its from a wrong conversion in my library that i will correct as soon as possible but in the mean time yo will have to use iota(); to convert b in to a string and printed out in the serial monitor as i have done in my previous code. Cheers.

Hi, i have already upload the new library, now you can print in the serial monitor without any conversion. if in the serial monitor you receive -1 values that means that the servo is not responding. Cheers.

hello, can I use the library to connect the AX-12 with firefly experiments for Grasshopper for Rhino? (http://www.fireflyexperiments.com/) FireFly links Rhino with Arduino but you have to upload the firefly firmata code which runs serial communication between the computer and the Arduino. Just wondering if this does interfere with the communication to the AX-12?

Hi, it will interfere with the communication unless you set the both communications at the same Baud Rate or you can use the Software Serial version of this library and use diferents pins for the communication.Good Luck.Cheers. :D

Hello, I am using an Adruino Uno and the Arduino 1.0 environment. I downloaded your Dynamixel_Serial and Dynamixel_SoftSerial library. I successfully changed the AX-12A baud rate from factory default to 9600 and have no problem getting the following code to work:

#include Dynamixel_Serial.h

void setup(){ Ax12.begin(9600);pinMode(13,OUTPUT);}

void loop(){Ax12.ledStatus(1,true);digitalWrite(13,HIGH);delay(1000);

Ax12.ledStatus(1, false );digitalWrite(13,LOW);delay(1000);}

but for some reasons I don't understand this code does not work for me:

Do you have any idea what might cause the Dynamixel_SoftSerial library to not function? I have to tell you I changed the includes from wireing.h to wire.h as I could not find any wireing.h under Arduino 1.0. Many Thanks, ...

Hi, no success changing the pins ... I did not use the NewSoftSerial 11 Beta before, so I downloaded it and replaced the Arduino standard one with it. It does not compile under Adruino 1.0 so I tried 0.22 and 0.23 where it compiles but the code still does not turn on the LED on the AX-12A. But the "normal" serial works under 0.22 and 0.23? Strange isn't it? This is the compiler error under Arduio 1.0:

Did you try it with the Uno and with Arduino 1.0 already? Are you running the Arduino on 16MHZ? May be some timing issues? Is there a way to debug the AX12.begin function while connecting it with the RX pin 0 and looking at it with the serial monitor? Thanks for your many help and advice!

Hi, no i haven’t check the library under Arduino 1.0 but will, I`m already downloading the 1.0 version, yes the arduino is at 16MHz, Timing issues? i think not but i will check that probability.Ax12.begin(); its just the normal Serial.begin(Baud Rate); instruction and Control pin declarations, and in SoftSerial version is the SoftSerial Puerto(Rx,Tx); object that creates the SerialPort. The serial monitor will just send you some rare ascii characters so that will be a little strange but if you want to give it a try it will be something like this:

The servo communication always start with 0xFF - 0xFF (255 - 255 Decimal) continued by the ID of the servo, next the length (how many commands you will send) 0x04 for the LED next the instruction 0x03 (Write or Read) in this case Write next the registrer of the led 0x19 next the state 1 or 0, On or Off (0x1 -On) and finally the checksum, the checksum its the addition of each command after the 0xFF 0xFF so it will be the ID + AX_LED_LENGTH + AX_WRITE_DATA + AX_LED + State, but the checksum should fit 1Byte so you should do this:while ( TChecksum >= 255){ TChecksum -= 255; }and the do:

Checksum = 255 - TChecksum; // The checksum its 1byte - (Data that we added before) The addition of all the commands.

And that will be your new Checksum that you have to send over serial. Cheers :D

Hi, thank you for writing this code! I can get it to work in Arduino 0.023 and the LED blinks! But as soon as I include the Dynamixel_SoftSerial.h and use the SoftSerial.begin(baud, Rx, Tx,D_Pin) function and the Ax12.ledStatus(ID, Status) nothing goes? Am I using the correct Dynamixel_SoftSerial.h and .cpp library files? You only published one version of it and that's the version which can be found here: http://sourceforge.net/projects/savelectronics.u/files/Dynamixel%20Library/?

Hi, yes its a redefinition of the same object already created. I have already fix that problem but I'm checking other things before uploading again. Mean while return to the Arduino 1.0 (Download and Install again), and when i upload the library actualization you will just have to paste the files in the libraries folder. :D Cheers

Hello Josué,your libraries are amazing, but your posts and the descriptions are a mess. Very very difficult to understand.I think it is important to make order in the posts.Can you write a post with a clear description and structure for each library?I mean:

Hi Josué,I would use the Dynamixel_SoftSerial.h but I don't understand witch is the library SoftwareSerial I have to use.Is the NewSoftSerial? Or something else? Can you paste a link to the library?I use Arduino IDE 0023 version. I can't compile using the NewSoftSerial or the SoftwareSerial provided with the 0023 IDE version.

Hello Josué, thanks for your help. Some little questions: - Can I use the instruction Ax12.begin(1000000,8,9,2) or I have to use a low baud rate (i.e 9600) ?- From your documentation: - Ax12.action( ID ) - is not correct. I can use only Ax12.action(), without the ID- I don't understand the istruction - Ax12.moveSpeedRW( ID, Position, Speed ) or the instruction Ax12.moveRW(ID, Position). I don't understand the difference from Ax12.moveSpeed or Ax12.move- I'm using two servos. If I use these instructions starting from the same position (512):Ax12.moveSpeed(1,800,400); Ax12.moveSpeed(2,800,400); the two servos have different speed. the servo 1 arrives earlier than the servo 2. They don't arrive at the same time. Why?

Hi, No you cant`t set a higher baud rate than 115200 cause its SoftwareSerial.- Yes i will create a new documentation correcting those things its just Ax12.action();- The difference from Ax12.moveRW(); Ax12.moveSpeedRW(); and Ax12.move Ax12.moveSpeed();its when the servos are going to move,Ax12.move(); it will move the servo right away and RW its for recording all the servos movements and executed all at the same time, for example Ax12.moveRW(); will not move until the Ax12.action(); is send. - The two servos arrives at different time cause Ax12.moveSpeed(1,800,400); is executed before theAx12.moveSpeed(2,800,400); they are at the same speed but one is excited before the other, the solution will be with the RW instructions for example:

using 115200 it works! thanks.I tried to use the Ax12.moveSpeedRW ad I think it works. There is a little delay between the 2 servos, but it is acceptable for my goal. I can reduce the speed in order to have a better result.

Another question, sorry Josué.If I well understand I can use the Dynamixel_SoftSerial without the USB2Serial shield. I can use only the standard serial port via USB and 2 other pins to communicate with the AX-12A servos. So I changed the servos baud rate to 115200. I wired the pin RX(1Y1) of 74LS241 to the pin 5 of Arduino and the pin TX(2A4) to the pin 6 of Arduino. This is the code I used:

Hi, there is no problem in your code, but i think the error its my Library, try this.1- Go to the libraries Folder of the arduino 2- Open the File Dinamixel_SoftSerial.h in Dinamixel_SoftSerial folder3- Replace the line SoftwareSerial SoftSerial(0,1); with SoftwareSerial SoftSerial(5,6);4- Compile and try again with the your same code.5- Let me know if that solve the problem.

Or you can try downloading the Library for Arduino IDE 1.0 i think it run on the Arduino IDE 0023 but thats the last update of the library. Cheers.

Hi,I confirm you the library works perfectly with 1.0 version. I use 115200 baud rate and without modifications it works. Amazing!!!

With the 0023 version the library doesn't work. I changed the source code of the library and replaced the line SoftwareSerial SoftSerial(0,1); with SoftwareSerial SoftSerial(5,6); in the Dinamixel_SoftSerial.cpp not in the Dinamixel_SoftSerial.h as you wrote. No good results. For me this is a push to change the Arduino IDE version. Thanks a lot.

Hi,I want use the Dynamixel servos with normal hobby servos at the same time. But the servo.h library, used with the Dynamixel library, doesn't work.The SoftwareServo.h library works very well with your Dynamixel library. So the Dynamixel servos can be used for 'noble' purposes, while normal servos can be used for 'humble' purposes in the same application. Maybe this information could be useful for someone. Cheers.

Hello Josuè,I have a problem with the Dynamixel_SoftSerial library. It works in TRANSMISSION. I can use Ax12.move(ID, POSITION) or the other possibilities without problems. I have a problem RECEIVING the data from the servos. If I use Ax12.readTemperature(ID) or Ax12.readVoltage(ID) or Ax12.readPosition(ID) I receive always -1.I changed the baud rate, i.e. 9600, 38400, 57600, 115200 but it doesn't work. Always -1. I use an Arduino 2009 and 2 AX12-A servos.Can you make a test with this code?

Hi, your code only need a } in the setup(){}, but thats not real error, is the Software Serial that is not reading properly, i will check if the error is in my library or the SoftwareSerial Library and I'm about to upload a newer version of the libraries with 16 new functions, i spect to upload the in a week. Cheers. :d

I make a little program to see what the SoftSerial is reading from the Dynamixel servo and just i suspect the SoftwareSerial library is doing bad readings, i think we will have to wait until arduino solve that error.

Hi great job its works great , but is there a way to move 2 motor the exact same time , where one must move the opposite of the other one .or is there a way to invert one of my motors , thanks for your help.

Yes i kwon ,but my motors working together , and stand to the opposite of each other so when 1 motor stand on pos: 700 the other must invert pos 700 , i have try this ,but they working against each other.thanks for your help i try to make a function Dynamixel.setDir(id , 1) and thats mean motor id is invert ,so i not have to calculate the opposites positions , and can they better work together , i try this bij a other class AX12.

Dynamixel.begin(1000000,2); // Inicialize the servo at 1Mbps and Pin Control 2 Dynamixel.setTempLimit(1,80); // Set Max Temperature to 80 Celcius Dynamixel.setVoltageLimit(1,65,160); // Set Operating Voltage from 6.5v to 16v Dynamixel.setMaxTorque(1,1023); // 50% of Torque Dynamixel.setSRL(1,2); // Set the SRL to Return All Dynamixel.setTempLimit(2,80); // Set Max Temperature to 80 Celcius Dynamixel.setVoltageLimit(2,65,160); // Set Operating Voltage from 6.5v to 16v Dynamixel.setMaxTorque(2,1023); // 50% of Torque Dynamixel.setSRL(2,2); // Set the SRL to Return All

and this is now my problem , by reading this it shout work , but i dont , dir2 is the oposite from dir1 but it will not execute that way , do some one else having a solution for this ,sorry for my bad english . thanks for the help , thats why if i had the function to invert one of my motors i can set them whit one var ,to 2 motors , maybe there is a other solution .

Hi i found out whats going wrong , the motors have work against each other when i try something , and become requily in alarm ,and so he have reset themself i think and set both motor on id 1, do you know of i can protect that part so he not going te reset its ids , thanks for the help.

Hi, if you set the motors to Id 1 you will have to change the status return level to just return data on readings, cause if the both motors return status there will be some errors in the comunication due to the daisy chain. I recomend a stable power source with caps filters. Good luck :)

Hi josue thanks for the help , i have a problem your lib works fine whit arduino 1.0 , but whit arduino 0023 i cant get it works ,i download your lib for that place it into the library folder ,but it wont work , i needs it there because i use the apc220 modulles and the lcd crystal i2c and they wont work in arduino 1.0 ,what i doing wrong this my fault code :sketch_mar13a.ccp: In fuction 'void setup()'sketch_mar13a.19: error: 'Dynamixel' was mot declared in this scope

i think he cant read the library

i try to safe this as i scetch , save as ... and then name itbut that works eather.can you help me whit this, thanks for your help

Hi i have try to instal this but its not working what do i wrong.i download it , unpack , place the unpact folder in arduino_0023/libraries .i also download the newserialsoftware , place it in the libraries folder, i also copy then and place then in the example folder .but when i complimy the program here above , i get only errors that he not reconice the dynamixel.begin() ect , can you tell me what i am doing wrong or forget , thanks for the help marcel nijssen

Hi josue its works fine now thats whats i did wrong , i have a question when i upload a program :the link its to big for here :

http://hierden4.nl/program.txt

what will work for my turret controling whit a memsic2125 for when i drive down turret goes a little up its not perfect jet , but thats not my biggeds problem , that problem is when my power is off ,and then when i turn it on then my program is lost because the flash memory , is there a solution to save this skech in the eeprom or a other way to save this in the uc ? how do you store programs or upload you then when you use it first, thank for the help.its to big for the eeprom memory right 8742 bytes i use the 328 atmelmarcel nijssen

Hola!I am trying to control 2 AX-12's with an Uno, and having compile errors when trying to utilize your SoftwareSerial code.I get "within this context" when I try to compile Dynamixel_Conf.This error highlights "setRXPin(DRx);" under the DynamixelSoftSerial.cpp file. I am trying to use a 74LS241 to compensate for the lack of arduino speed.Thanks for your help!Craig

Has anyone encountered a problem like this, or can suggest a solution?

I've tried plugging each servo in to the arduino individually and still get the same problem - they respond to commands but only one will reply with data - all three will respond and reply when I use the Dynamixel Wizard and my USB interface.

Thanks, I realised after posting that I had not put any terminating resistor on my RS485 IC. I added this (but mistakenly added a 220R at first) now I get reliable data from two of the servos and garbage from the third - I am guessing that there is still an issue with my electronics as all three work fine when using the USB to RS485 converter. Just ordered a sparkfun RS485 breakout board to try instead of my breadboarded one.

Thanks for the suggestion - and thanks for writing the library - great stuff, saved me tons of work.

Hi savage, i am currently using a arduino uno and RS485 to generate movement for rx-28 motor. I have tried downloading and using your libraries but it still cant work.Could you please help me thanks in advance.

Hey savage thanks for the response.It's this motor, http://crustcrawler.com/motors/RX28/docs/RX28_Manual.pdfThe problem is now i cant communicate with my motor.. I tried using your library but it cant talk to my dynamixel. This is my circuit drawing:http://arduino.cc/forum/index.php?action=dlattach;topic=103204.0;attach=17721;image

I put the DynamixelSerial library in the C:\Program Files\arduino-1.0\libraries folder.

I then opened the Arduino IDE and loaded your examples, such as Dynamixel_Write, into a project fileI called Ax12v1.

Upon compiling, I get a slew of errors, the first being:

"Ax12v1.cpp:1:29: error: DynamixelSerial.h: No such file or directory"

It doesn't matter which of your example files I paste into my IDE, compilation always returns the same initial issue.

I tried moving the folder structure around, placing the DynamixelSerial folder (the one that contains the DynamixelSerial.h file) directly into C:\Program Files\arduino-1.0\libraries. So, the path to the header file is in C:\Program Files\arduino-1.0\libraries\DynamixelSerial. That didn't help.

I've read thru this forum looking for the answer. There seemed, at one time, to be some discrepency between using "Dynamixel" vs "Ax12" as the object. But looking in the header file, I see:

extern DynamixelClass Dynamixel;

And I _don't_ see Ax12 as a data type anywhere in there. So, I'm guessing that "Dynamixel" is right.

But the compiler can't seem to find the DynamixelSerial.h file and complains with the "No such file or directory" error.

I'm starting a project based around your post here using the arduino micro controller with an MX-28 rather than the AX-12. I have the servo connected through a 74ls241n buffer and am running your basic write code, but im not getting any results. the program compiles fine and when i connect everything the servo gives the single blink power confirmation so its powered properly, but there must be something im missing here... i also checked the table for the mx28 and it seems to be the same as the ax12 so all of the commands called by the program you wrote should work fine. I know its sort of a vague question considering you cant be here in person to debug but i was curious if you had any ideas on where to go from here to get it all to work

Hi Phillip, in this type of communications is very important to join the grounds of your power supplies so that the both chips can talk each other correctly. Could be that or maybe some broken wires. Hope that helps.