demo project

Dependencies:   AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL

Revision:
12:ac6c9d7f8c40
Parent:
11:3a2e6eb9fbb8
Child:
13:ffeff9b5e513
--- a/RobotArm.cpp	Wed Jan 06 22:25:51 2016 +0000
+++ b/RobotArm.cpp	Thu Jan 07 17:31:23 2016 +0000
@@ -2,7 +2,7 @@
 #include "rtos.h"
 
 #include <DynamixelBus.h>
-#include <AX12.h>
+#include <NodeAX12.h>
 #include <Terminal.h>
 #include <vector>
 #include <RobotArm.h>
@@ -23,9 +23,8 @@
     // build arm
     for (int i = 0; i < NUMPARTS; i++)
     {
-        AX12* servo = new AX12(&dynbus, PartIds[i]);
-        servo->TorqueEnable(false);
-        servo->TorqueEnable(true);
+        NodeAX12* servo = new NodeAX12(&dynbus, PartIds[i]);
+        servo->DoAction(NA_Init, 0.0f);
         _armParts[i] = dynamic_cast<RobotNode*>(servo);
     }
     _numParts = NUMPARTS;