Fork from Dynamixel AX12 Servo for MX64 use and not-finishi now

Dependents:   2014-Mx64 2014-mx64-test

Fork of AX12 by Chris Styles

This Library was Fork From Chris Styles's AX12 Library .

Dynamixel MX64 Servo

MX64 is like a new generation Dynamixel Servo Use TTL 2.0 bus, Half-duplex Serial just like a pro-version AX12 300

Quote:

The MX-64T Dynamixel Robot Servo Actuator is the newest generation of Robotis Dynamixel actuator; equipped with an onboard 32bit 72mhz Cortex M3, a contact-less magnetic encoder with 4x the resolution over the AX/RX series, and up to 3mpbs using the new TTL 2.0 bus. Each servo has the ability to track its speed, temperature, shaft position, voltage, and load.

Information

In cace AX12 you can use This Library

Import libraryAX12

new ax12 lib

You need this Dependence Library SerialHalfDuplex library too

Import librarySerialHalfDuplex

Serial Half Duplex implementation

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Sun Apr 10 21:20:44 2011 +0000
Parent:
2:5ea99c37a2d7
Child:
4:acc6261cf054
Commit message:
Added baud rate function to the AX12 class

Changed in this revision

AX12.cpp Show annotated file Show diff for this revision Revisions of this file
AX12.h Show annotated file Show diff for this revision Revisions of this file
--- a/AX12.cpp	Sun Apr 10 20:58:21 2011 +0000
+++ b/AX12.cpp	Sun Apr 10 21:20:44 2011 +0000
@@ -159,6 +159,21 @@
 }
 
 
+int AX12::SetBaud (int baud) {
+
+    char data[1];
+    data[0] = baud;
+
+#ifdef AX12_DEBUG
+    printf("Setting Baud rate to %d\n",baud);
+#endif
+
+    return (write(0xFE, AX12_REG_BAUD, 1, data));
+
+}
+
+
+
 // return 1 is the servo is still in flight
 int AX12::isMoving(void) {
 
--- a/AX12.h	Sun Apr 10 20:58:21 2011 +0000
+++ b/AX12.h	Sun Apr 10 21:20:44 2011 +0000
@@ -32,6 +32,7 @@
 //#define AX12_DEBUG 0
 
 #define AX12_REG_ID 0x3
+#define AX12_REG_BAUD 0x4
 #define AX12_REG_CW_LIMIT 0x06
 #define AX12_REG_CCW_LIMIT 0x08
 #define AX12_REG_GOAL_POSITION 0x1E
@@ -86,6 +87,21 @@
      */
     int SetMode(int mode);
 
+    /** Set baud rate of all attached servos
+     * @param mode
+     *    0x01 = 1,000,000 bps
+     *    0x03 =   500,000 bps
+     *    0x04 =   400,000 bps
+     *    0x07 =   250,000 bps
+     *    0x09 =   200,000 bps
+     *    0x10 =   115,200 bps
+     *    0x22 =    57,600 bps
+     *    0x67 =    19,200 bps
+     *    0xCF =     9,600 bp
+     */
+    int SetBaud(int baud);
+
+
     /** Set goal angle in integer degrees, in positional mode
      *
      * @param degrees 0-300