![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Still Test
Dependencies: DXL_SDK_For_F446RE RobotControl_7Axis Matrix mbed
Diff: main.cpp
- Revision:
- 0:1780ffc33286
- Child:
- 2:fb9508744bc4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Feb 07 04:12:41 2017 +0000 @@ -0,0 +1,40 @@ +#include "mbed.h" +#include "dynamixel.h" + +#define ADDRESS_LED 0x19 + + +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 *** + **************************/ + + pc.printf("before=%d\n",rt); + 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); + //myled = 1; // LED is ON + wait(2); + dxl_write_byte(3,ADDRESS_LED,0); + //myled = 0; // LED is ON + wait(2); + } +} \ No newline at end of file