Provides an interface to an AX-12A servo. Requires the Dynamixel bus protocol library/

Fork of AX-12A by Jonathan Pickett

Revision:
5:bae6dc62dfb4
Parent:
4:56c593ae9a45
Parent:
2:f2da3b1d9988
Child:
6:a702043b1420
--- a/AX12.cpp	Mon Dec 28 17:19:02 2015 +0000
+++ b/AX12.cpp	Mon Dec 28 17:28:16 2015 +0000
@@ -25,6 +25,21 @@
 
 /*****/
 
+StatusCode AX12::SetServoId(char newId)
+{
+    int offset = ctID;
+    CommBuffer data;
+    data.push_back( newId );
+    StatusCode s = _pbus->Write(_ID, offset, data); 
+    if( s == statusValid )
+    {
+        _ID = newId;
+    }
+    return s;
+}
+
+/*****/
+
 StatusCode AX12::SetGoal(float degrees)
 {
     _LastError = statusValid;
@@ -242,3 +257,4 @@
 {
     return _LastError;
 }
+