1

I want to controll two dynamixel ax-12 servos using a arduino mega and I don`t know the commands that I should send to them using Serial.

Could anyone help me with this? (And please keep in mind that I don`t want any more hardware. Just arduino board)

asked Apr 13, 2017 at 17:24
2
  • I believe that that site might help you; support.robotis.com/en/techsupport_eng.htm#product/dynamixel/… On the left menu, seek that menu path: Home > Software Help > Software development kit > Controller Embedded C Commented Apr 13, 2017 at 17:45
  • how to read position, and the hardware configuration ? pls help me Commented Aug 21, 2018 at 10:15

1 Answer 1

2

With Dynamixel library you can use servo this easily:

#include <DynamixelSerial.h>
void setup(){
 Dynamixel.begin(1000000,2); // Inicialize the servo at 1Mbps and Pin Control 2
}
void loop(){
 Dynamixel.move(1,0);
 delay(2000);
 Dynamixel.move(1,500);
 delay(2000);
 Dynamixel.move(1,1000);
 delay(2000);
}

Example moves servo and makes pauses of 2 sec.

Installation is easy:

Installation:

Copy the files from DynamixeSerial to your IDE libraries folder.

DynamixelSerial folder can be found here: https://sourceforge.net/projects/dynamixelforarduino/files/?source=navbar

answered Apr 13, 2017 at 18:30
1
  • But how to connect the arduino and servo?The servo requires half-duplex serial port,but arduino is uart.I want to control the servo and also read the data from it. Commented Apr 10, 2018 at 14:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.