Go Down

Topic: Moving Servomotors (Read 3358 times) previous topic - next topic

vinceherman

I don't know, because I don't know what a "ServoCds55" is.
I have not used it, but a library by that name is used to drive a servo shield for Dynamixel servos.  These are not standard RC hobby servos, but higher end robotics servos with more complex communication.

AWOL

...but do they need IDs in the range 1000 ... 2000 ... 3000 ?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

vinceherman

Does the ServoCds55 library have any examples or test sketches in it?  Have you tried them?

I like to break troubleshooting down into its smallest parts.
Can I get the servo to move?
Can I read input and display it to the serial monitor?
Can I use that input to command the servos?

Start out with making the servos move using the test in the library.

Oeildelys

Thank you for your quick answers.
Yes, there is an test example called ServoCds55_Test, that allows to move AX-12A Servos.

I tried it successfully.
But this test example doesn't allow me to give the instruction to a particular servo to move to a position of angle (I send "1180", I want the Servo 1 to move to the position 180°).

slipstick

#19
Dec 04, 2017, 06:35 pm Last Edit: Dec 04, 2017, 06:37 pm by slipstick
Instead of printing (ID+pos) try printing ID and pos separately just before the myservo.write(). I think you'll see your problem instantly.

Steve

vinceherman

try printing ID and pos separately just before the myservo.write().
+1

Oeildelys

Thank you both.
I removed the *1000 and wrote this instead :

Code: [Select]

 Serial.print("ID=");
Serial.print(ID);
Serial.print(" pos=");
Serial.println(pos);

I receive the right ID (1 instead of 1000 ; 2 instead of 2000...) and the right position.
But there's still no movements.

slipstick

And now we have the ID sorted out try putting in a myservo.begin() like in the sample program.

Steve

Oeildelys

And now we have the ID sorted out try putting in a myservo.begin() like in the sample program.

Steve
All is perfect, I just had to add myservo.begin() as you said, and to change the ServoCds55 Library and now all is working pretty well !
Thank you very much !

Go Up