HerkuleX-HelloWorld

Dependencies:   herkulex mbed

This herkulex library is based on DongBu Robot documentation and protocol.

http://dasarobot.com/guide/herkulexeng.pdf

/media/uploads/passionvirus/mbedandherkulex_i.png /media/uploads/passionvirus/range.png

main.cpp

Committer:
passionvirus
Date:
2013-01-14
Revision:
0:50f3665aec00
Child:
1:ef646c52e08f

File content as of revision 0:50f3665aec00:

#include "mbed.h"
#include "herkulex.h"

Herkulex sv(p9, p10, 115200);
DigitalOut led(LED1);

int main() 
{   
    wait(1);
    sv.setTorque(0xFD, TORQUE_ON);
    while(1) 
    {
        led=1;
        sv.movePos(0xFD, 1002, 100, SET_MODE_POS, SET_LED_GREEN_ON);
        wait(3);
        
        led=0;       
        sv.movePos(0xFD, 21, 100, SET_MODE_POS, SET_LED_BLUE_ON);
        wait(3);
    }
}