Debugged library

Dependents:   MX106-finaltest dynamixel Arm_dynamixel_can Arm_dynamixel_can_procedurale

Fork of AX12_v2 by Team DIANA

Revision:
7:ac233ac0ba11
Parent:
5:04c4615a2221
Child:
8:ae950cba6bc9
--- a/AX12.cpp	Tue Apr 26 16:46:33 2016 +0000
+++ b/AX12.cpp	Fri Apr 29 13:22:00 2016 +0000
@@ -28,7 +28,7 @@
 AX12::AX12(PinName tx, PinName rx, int ID)
         : _ax12(tx,rx) {
 
-    _ax12.baud(57600);
+    _ax12.baud(9600);
     _ID = ID;
 }
 
@@ -99,7 +99,7 @@
 
     data[0] = goal & 0xff; // bottom 8 bits
     data[1] = goal >> 8;   // top 8 bits
-
+    
     // write the packet, return the error code
     int rVal = write(_ID, 0x20, 2, data);
 
@@ -331,16 +331,16 @@
     }
 
     // Wait for the bytes to be transmitted
-    wait (0.00002);
+   // wait (0.00002);
 
     // Skip if the read was to the broadcast address
     if (_ID != 0xFE) {
 
         // Receive the Status packet 6+ number of bytes read
         for (int i=0; i<(6+bytes) ; i++) {
-             printf("Inizio lettura numero %d\n",i);
+             //printf("Inizio lettura numero %d\n",i);
             Status[i] = _ax12.getc();
-             printf("Fine lettura numero %d\n",i);
+
         }
 
         // Copy the data from Status into data for return