D:/DRISSI/arduino-0022/arduino-0022/libraries/dynamixelUse/dynamixelUse.h
Go to the documentation of this file.
00001 
00006 #ifndef dynamixelUse_h
00007 #define dynamixelUse_h
00008 
00009 
00010 #include <WProgram.h>
00011 #include "../dynamixel/dynamixel.h"
00012 
00013 
00014 #define delete(arg) arg.~Dynamixel()// Permission to call destructor by calling a virtual delete function
00015 
00023 class Dynamixel
00024 {
00025 public:
00027 
00029                                         Dynamixel();
00031                                         ~Dynamixel();
00032 
00036         bool                    SendPing(unsigned char ID);
00037 
00045         bool                    ManSend(unsigned char ID,unsigned char Instruction,unsigned char *Parameters,int NbParam,int LengthToRead); 
00046 
00050         int                             CheckPacket(unsigned char *Packet);
00051 
00054         void                    ClearReceptionBuffer();
00055 
00059         bool                    LeaveAlarmShutdownMode(unsigned char ID);
00060 
00061 
00062 
00064 
00069         bool                    SetGoalPosition(unsigned char ID,unsigned short Angle);
00070 
00075         bool                    SetCWAngleLimit(unsigned char ID,unsigned short Angle);
00076 
00081         bool                    SetCCWAngleLimit(unsigned char ID,unsigned short Angle);
00082         
00087         bool                    SetMovSpeed(unsigned char ID,unsigned short Speed);
00088         
00093         bool                    SetReturnDelayTime(unsigned char ID, unsigned char Delay);
00094 
00099         bool                    SetMaxTorque(unsigned char ID, unsigned short Torque); 
00100 
00105         bool                    SetTorqueEnable(unsigned char ID, bool Enable);
00106         
00111         bool                    SetCWComplianceMargin(unsigned char ID, unsigned char Margin);
00112 
00117         bool                    SetCCWComplianceMargin(unsigned char ID, unsigned char Margin);
00118         
00123         bool                    SetCWComplianceSlope(unsigned char ID, unsigned char Slope);
00124 
00129         bool                    SetCCWComplianceSlope(unsigned char ID, unsigned char Slope); 
00130         
00135         bool                    SetTorqueLimit(unsigned char ID, unsigned short Torque);
00136                                                                                                                                                                                                         
00137 
00139 
00143         short                   GetCWAngleLimit(unsigned char ID);
00144 
00148         short                   GetCCWAngleLimit(unsigned char ID);
00149 
00153         short                   GetMovSpeed(unsigned char ID);
00154         
00158         short                   GetReturnDelayTime(unsigned char ID);
00159 
00163         short                   GetMaxTorque(unsigned char ID);
00164 
00168         char                    GetTorqueEnable(unsigned char ID);
00169         
00173         short                   GetCWComplianceMargin(unsigned char ID);
00174 
00178         short                   GetCCWComplianceMargin(unsigned char ID);
00179 
00183         short                   GetCWComplianceSlope(unsigned char ID);
00184 
00188         short                   GetCCWComplianceSlope(unsigned char ID);
00189 
00193         short                   GetTorqueLimit(unsigned char ID);
00194         
00198         short                   GetPresentPosition(unsigned char ID);
00199 
00203         short                   GetPresentSpeed(unsigned char ID);
00204 
00208         short                   GetPresentLoad(unsigned char ID);
00209 
00213         char                    GetMoving(unsigned char ID);
00214 
00215 
00217 
00218         unsigned long   TimeOut;
00219         
00220 };
00221 
00222 
00223 #endif