![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Still Test
Dependencies: DXL_SDK_For_F446RE RobotControl_7Axis Matrix mbed
main.cpp
- Committer:
- stanley1228
- Date:
- 2017-02-07
- Revision:
- 2:fb9508744bc4
- Parent:
- 0:1780ffc33286
- Child:
- 3:8a9407817ba9
File content as of revision 2:fb9508744bc4:
#include "mbed.h" #include "dynamixel.h" #define ADDRESS_LED 0x19 #define GOAL_POSITION 30 DigitalOut myled(LED1); Serial pc(SERIAL_TX, SERIAL_RX); int main() { int rt =0; pc.printf("start\n",rt); rt=dxl_initialize( 1, 1); pc.printf("dxl_initialize rt=%d\n",rt); myled = 0; // LED is ON /************************** *** Check communication *** **************************/ //dxl_write_byte(3,ADDRESS_LED,0); //dxl_ping(3); while(1) { pc.printf("before=%d\n",rt); //dxl_write_word(3,GOAL_POSITION,400); setPosition(3,2048,10); pc.printf("after=%d\n",rt); //myled = 1; // LED is ON wait(4); //dxl_write_word(3,GOAL_POSITION,-400); setPosition(3,-2048,10); //myled = 0; // LED is ON wait(4); } }