Go Down

Topic: Servo Dongbu Robot HerkuleX DRS-0101 : Status Error 255 (Read 2934 times) previous topic - next topic

biskandar

I tried to control this servo motor from Arduino UNO, it used serial communication.

And i used this servo library below :
http://www.sgbotic.com/products/datasheets/robotics/HerkuleX.zip
http://www.sgbotic.com/products/datasheets/robotics/HerkuleX_Arduino_library_Quickstart_Eng.pdf

But so far the example code that they give it doesn't work properly, it always display status error 255 from the servo.

The servo itself has no problem, i found there no red led blink signs as error.

and please find the following code below :

#include <HerkuleX.h>
#define RX   8
#define TX   9
#define MI 253
void setup() {
  Serial.begin( 9600 ) ;
  HerkuleX.begin( 57600 , RX , TX ) ;
  delay( 10 ) ; 
}
void loop(){
  Serial.println( HerkuleX.getStatus( MI ) ) ;
}


wildbill

Hard to say without reading the docs in detail, but I wonder where the motorid is set. It seems to be the address of the servo, so that you can use multiples on a single bus. Do you have to use the vendor's software to find out/set the motorid for your particular servo?

alegiaco

The herkulex has the communication speed set to 115200 baud. Did you change the baud to 57600? Otherwise it doesn't work.
The ID out of the box is 0xFD, corresponding to 253. It's correct.

biskandar

Thanks alegiaco,

Ja indeed, i put wrong baud rate value, i should be 115200, and it works well.

/Benny

Go Up