![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Still Test
Dependencies: DXL_SDK_For_F446RE RobotControl_7Axis Matrix mbed
Diff: main.cpp
- Revision:
- 2:fb9508744bc4
- Parent:
- 0:1780ffc33286
- Child:
- 3:8a9407817ba9
--- a/main.cpp Tue Feb 07 08:46:10 2017 +0000 +++ b/main.cpp Tue Feb 07 09:50:51 2017 +0000 @@ -2,7 +2,7 @@ #include "dynamixel.h" #define ADDRESS_LED 0x19 - +#define GOAL_POSITION 30 DigitalOut myled(LED1); Serial pc(SERIAL_TX, SERIAL_RX); @@ -22,19 +22,24 @@ /************************** *** Check communication *** **************************/ - - pc.printf("before=%d\n",rt); - dxl_write_byte(3,ADDRESS_LED,0); + //dxl_write_byte(3,ADDRESS_LED,0); //dxl_ping(3); - pc.printf("after=%d\n",rt); + while(1) { - dxl_write_byte(3,ADDRESS_LED,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(2); - dxl_write_byte(3,ADDRESS_LED,0); + wait(4); + //dxl_write_word(3,GOAL_POSITION,-400); + setPosition(3,-2048,10); //myled = 0; // LED is ON - wait(2); + wait(4); + } } \ No newline at end of file