Go Down

Topic: Servo Dongbu Robot HerkuleX DRS-0101 : Status Error 255 (Read 3728 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

soheila

#include <Herkulex.h>
int n=219; //motor ID
void setup() 
{
  delay(2000); 
  Serial.begin(115200);   
  Herkulex.beginSerial1(115200);
  Herkulex.reboot(254);
  delay(5000);
  Herkulex.clearError(n);
  Herkulex.ACK(1);
  Herkulex.setLed(n,3);
  Serial.println(Herkulex.stat(n));
  Herkulex.torqueON(n);
  delay(1000);
 
}

void loop(){
 
 

 
 
 
 
 I am using an arduino mega 2560 and Herkulex DRS 0402. Using library from this site:
http://robottini.altervista.org/dongbu-herkulex-arduino-library-2
and the above code I cannot run the servo. The output of Herkulex.stat is 255 and while it gets to torqueON command it starts red blinking. Help me please, I am really confused, I stuck in this point more than one week!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy