herkulex servo control library

Fork of herkulex by Yoonseok Pyo

Revision:
7:0d98883391a2
Parent:
6:1dacff31b77a
--- a/herkulex.h	Mon Jan 14 21:03:43 2013 +0000
+++ b/herkulex.h	Thu Jun 21 10:28:43 2018 +0000
@@ -242,6 +242,9 @@
  * @endcode
  */
 //------------------------------------------------------------------------------
+
+extern Serial *pc;
+    
 class Herkulex
 {
 public:
@@ -281,9 +284,9 @@
     /** Set torque setting
      *        
      * @param id The herkulex servo ID.
-     * @param cmdTorue The Command for setting of torque (TORQUE_FREE 0x00, BREAK_ON 0x40, TORQUE_ON 0x60)
+     * @param cmdTrue The Command for setting of torque (TORQUE_FREE 0x00, BREAK_ON 0x40, TORQUE_ON 0x60)
      */      
-    void setTorque(uint8_t id, uint8_t cmdTorue);
+    void setTorque(uint8_t id, uint8_t cmdTrue);
     
     /** Position Control
      *        
@@ -316,15 +319,17 @@
      */         
     int16_t getPos(uint8_t id);
          
+    void leds(uint8_t id, uint8_t val);     
+         
 private :
 
     /** PC serial connection used in debug mode.
     */
-    Serial *pc;
+
     
     /** Serial connection (mbed <-> herkulex).
     */  
-    Serial *txd, *rxd;
+    RawSerial *txd;
 };
 
 //------------------------------------------------------------------------------