I'm new to arduino programing. I able to make Smart Arduino Digital Servo Shield for Dynamixel AX - DFRobot Smart Servo Shield for Arduino + Ax-12A servos work for me in "continous (rotation) mode", but I'm unable to control servo position in "servo mode". The problem is that I can only control servo velocity and when I change values for servo position, the servo start rotating CCW with defined velocity
That's the code to control servo position in "servo mode"
/*
# This Sample code is for testing the Digital Servo Shield.
# Editor : Phoebe
# Date : 2013.5.17
# Ver : 0.1
# Product: Digital Servo Shield for Arduino
# SKU :
# Hardwares:
1. Arduino UNO
2. Digital Servo Shield for Arduino
3. Digital Servos( Compatible with AX-12,CDS55xx...etc)
4. Power supply:6.5 - 12V
*/
#include <SPI.h>
#include <ServoCds55.h>
#include "pins_arduino.h"
ServoCds55 myservo;
void setup (void)
{
Serial.begin (115200);
digitalWrite(SS, HIGH);
SPI.begin ();
SPI.setClockDivider(SPI_CLOCK_DIV8);
}
void loop (void)
{
myservo.setVelocity(100);// set velocity to 100(range:0-300) in Servo mode
myservo.write(1,300);//ID:1 Pos:300
delay(3000);
myservo.write(,0);//ID:1 Pos:0
}
Do you have a servo? Or do you have a variable speed, reversible, electric motor? They are not interchangeable. If you have a servo, you can't make it rotate continuously. If you have a variable speed, reversible, electric motor (sold by some morons under the name continuous rotation servo) you can't make it go to a position and stop.
I have Dynamixel AX-12A servos, I can control them in continuous rotation mode only, I can change velocity, direction, and id's of servos. But i can't use them as normal servos (Control position in deg) because they start rotating counter clockwise. And I'm sure thta's something wrong with the code. I'm beginner with arduino programming and I can't identify the problem. that's why I'm asking for help
You right , your comments are not wrong they are just completely irrelevant and useless for me. I assume that you don't know the answer. Stop wasting my time
I assume that you don't know the answer. Stop wasting my time
I do know the answer. I've told you the answer. You just won't accept that you can't make a silk purse out of a sow's ear. Get over it, and quit wasting our time.
If you know the answer can you use technical language not metaphors? I'm new to arduino and programming and not really sure what you mean by "you can't use an elephant as a riot control gun."
If you know the answer can you use technical language not metaphors?
I have. You didn't understand, or didn't like the answer. So, I tried a different approach.
A servo is a variable speed, reversible, electric motor with limits and position encoders, so that it can go to a specified position and stop.
A continuous rotation "servo" is a regular servo that has been modified. The limits have been removed, along with the position encoders. It is, therefore, technically no longer a servo, and anyone that says it is is wrong.
What you have is a piece of hardware that is missing stuff needed to be a servo.
You can't make something that is not a servo behave like a servo.
Thank you very much, now it's much simpler From what I know and what I've seen (forums and YouTube ) it' s possible to control position of dynamical actuators both ways (continuous rotation and like"servo") The code I've attached is the part of the official library (responsible for "servo "mode) for the Smart Servo Shield I've bought. The rest of the code to use AX-12A in continuous mode work well for me the same with code to change and reset ID,s.
Hi jedrzejgalecki,
I recently buy the "Smart Servo Shield" one week agoo . This one
=> Smart Arduino Digital Servo Shield for Dynamixel AX - DFRobot
And follow the insctruction about how to plug and use the sample code DFRobot give but don't work ..
I think i will become crazy. Me too i can't use my Dynamixel AX-12A
DFRobot said , this is full compatible with Dynamixel AX/MX series servos. But i can not make work my servos =(
So , are you finally find a solution on your problem ? Cause it's look same as me
Thank you a lot
This is how i plug the shield and the servo on my arduino mega 2560:
Woo so nice !
Thanks a lot for this quickly answer.
So, you mean this code line:
digitalWrite(SS, HIGH);
is belong to an arduino UNO and not for a arduino MEGA ?
That why this code doesn't work .
The only solution is to modify the library ? When you mean jumper D10 on the shield to D53 on the Mega , you mean connect the D10 on the shield to D53 on the Mega ? how can i do that ?
Thank again my friend. i'm exiting to finally approach the solution