D:/DRISSI/arduino-0022/arduino-0022/libraries/dynamixel/dynamixel.h
Go to the documentation of this file.
00001 
00007 #ifndef dynamixel_h
00008 #define dynamixel_h
00009 
00010 
00011 #include <WProgram.h>
00012 #include <TimerOne/TimerOne.h>
00013 
00014 
00015 /*
00016   dynamixel.h - Library for controling Dynamixel RX-24F
00017   from Robotis
00018 
00019 
00020   Copyright (c) 2011 David Drissi.  All right reserved.
00021   Property of the University of Angers.
00022 
00023   Contact : philippe.lucidarme@univ-angers.fr
00024 
00025   This library is distributed in the hope that it will be useful,
00026   but WITHOUT ANY WARRANTY; without even the implied warranty of
00027   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00028   Lesser General Public License for more details.  
00029 */
00030 
00032 #define PING                    0x01
00033 
00034 #define READ                    0x02
00035 
00036 #define READ_DATA               0x02
00037 
00038 #define WRITE                   0x03
00039 
00040 #define WRITE_DATA              0x03
00041 
00042 #define REG_WRITE               0x04
00043 
00044 #define ACTION                  0x05
00045 
00046 #define RESET                   0x06
00047 
00048 #define SYNC_WRITE              0x83
00049 #define __DEBUG__DYNAMIXEL__
00050 
00053 void    InitDynamixel();
00054 
00061 void    SendPacket (unsigned char ID, unsigned char Instruction,unsigned char * Parameters,int Nb);
00062 
00068 int             ReceivePacket (unsigned char * Buffer,int NbMax, long TimeOut_Us);
00069 
00073 int             Errors (unsigned char * Packet);
00074 
00077 void    EmptyReceptionBuffer ();
00078 
00081 void    ISR_TimeOut_Dynamixel();
00082 
00083 #endif