Hi everyone,
In order to use the powerful of Matlab Toolboxes and Simulink . I'm going to build a native library to control the Dynamixel Motors from Matlab directly.
My Source Code: https://github.com/quangthanh010290/MatlabDynamixel
I. Using Dynamixel SDK
- Step 1: Create Class
o = MyDynamixel();
- Step 2: Initialize the serial port
o.portNum = 16;
o.baudNum = 1;
o.init()
- Step 3: Add dynamixel motor base on their IDs
o.addDevice(5);
o.addDevice(16);
- Step 4: Set Speed for dynamixel (optimal, can use default setup)
o.setSpeed('id',5,'RPM',10);
o.setSpeed('id',16,'RPM',10);
- Step 5: Turn the Dynamixels
o.writeAngle('id',5,'deg',0);
o.writeAngle('id',16,'deg',0);
- Step 6: Unload resource
o.Exit();
- Result:
Comments
Post a Comment