sherzaad:
no idea if is going to make a difference but could you try this instead?
int resp;
void setup() {
// put your setup code here, to run once:
Serial1.begin(115200);
Serial.begin(115200);
}
void loop() {
byte acessWrite[] = {0xA5, 0x3F, 0x02, 0x07, 0x00, 0x01, 0xB3, 0xE7, 0x0F, 0x00, 0x10, 0x3E};
Serial1.write(acessWrite, 12);
for (int i = 0; i < 12; ++i) {
Serial1.write(acessWrite[i]);
}
delay(100);
if (Serial1.available()) {
while (Serial1.available() > 0) {
resp = Serial1.read();
Serial.print(resp, HEX);
Serial.print(" ");
}
}
Serial.print("nn");
byte disable[] = {0xA5, 0x3F, 0x02, 0x01, 0x00, 0x01, 0x01, 0x47, 0x01, 0x00, 0x33, 0x31};
for (int i = 0; i < 12; ++i) {
Serial1.write(disable[i]);
resp = Serial1.read();
Serial.print(resp, HEX);
Serial.print(" ");
}
delay(100);
if (Serial1.available()) {
while (Serial1.available() > 0) {
resp = Serial1.read();
Serial.print(resp, HEX);
Serial.print(" ");
}
}
Serial.print("nn");
}
}
at least with the above code you should see the WHOLE response after each request
hope that helps....
The response is still the same : FFFFFFFF for the first command and FFFFFFFF for the second.
UKHeliBob:
The hardware serial interfaces should work OK at 115200 baud
What exactly is this "servo drive" to which you refer ?
Can you please post a link to it ?
The drive is the DZRALTE-02L080. I've attached the datasheet and here the link for the serial comunication manual :
AMC_Datasheet_DZRALTE-020L080 (6).pdf (660 KB)