Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 3W_8Dir_p2pcontrol mbed
Fork of DXL_SDK_For_F446RE by
Revision 4:44560391db99, committed 2017-02-08
- Comitter:
- stanley1228
- Date:
- Wed Feb 08 15:49:35 2017 +0800
- Parent:
- 3:e2e9064c668d
- Child:
- 5:edccfcb47ab8
- Commit message:
- add ROM parameter setting to limit torque=55,multiturn offset=-1024,multiturn mode
Changed in this revision
| dynamixel.cpp | Show annotated file Show diff for this revision Revisions of this file |
| dynamixel.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/dynamixel.cpp Wed Feb 08 12:26:30 2017 +0800
+++ b/dynamixel.cpp Wed Feb 08 15:49:35 2017 +0800
@@ -334,7 +334,7 @@
//pc.printf("after dxl_txrx_packet\n",id,address,value);//stanley
}
-int dxl_read_word( int id, int address )
+int dxl_read_word( short int id, short int address )
{
while(giBusUsing);
@@ -349,7 +349,7 @@
return dxl_makeword((int)gbStatusPacket[PARAMETER], (int)gbStatusPacket[PARAMETER+1]);
}
-void dxl_write_word( int id, int address, int value )
+void dxl_write_word( short int id, short int address, short int value )
{
while(giBusUsing);
--- a/dynamixel.h Wed Feb 08 12:26:30 2017 +0800 +++ b/dynamixel.h Wed Feb 08 15:49:35 2017 +0800 @@ -66,33 +66,33 @@ //MX64 Register stanley/// +#define ID_ADDRESS 3 #define GOAL_POSITION 30 #define PRESENT_POS 36 -#define ID_ADDRESS 3 +#define RETURN_DELAY_TIME 5 #define CW_ANGLE_LIMIT_L 6 #define CW_ANGLE_LIMIT_H 7 #define CCW_ANGLE_LIMIT_L 8 #define CCW_ANGLE_LIMIT_H 9 -#define MOVING 46 -#define XL_MOVING 49 +#define MAX_TORQUE 14 +#define MULTITURN_OFFSET 20 #define GOAL_POSITION 30 +#define GOAL_SPEED 32 +#define TORQUE_LIMIT 34 #define PRESENT_POS 36 -#define ID_ADDRESS 3 -#define MOVING 46 -#define XL_MOVING 49 -#define CW_ANGLE_LIMIT_L 6 -#define CW_ANGLE_LIMIT_H 7 -#define CCW_ANGLE_LIMIT_L 8 -#define CCW_ANGLE_LIMIT_H 9 -#define ADDRESS_LED 0x19 + +#define STILL_MOVING 46 + + +#define ADDRESS_LED 25 //////////// high communication methods /////////////////////// void dxl_ping( int id ); int dxl_read_byte( int id, int address ); void dxl_write_byte( int id, int address, int value ); -int dxl_read_word( int id, int address ); -void dxl_write_word( int id, int address, int value ); +int dxl_read_word( short int id, short int address ); +void dxl_write_word( short int id, short int address, short int value ); int syncWrite_u16base(short int start_addr, short int data_length, short int *param, short int param_length); // WORD(16bit) syncwrite() for DXL void setPosition(int ServoID, int Position, int Speed);//stanley
