Sending Serial Bytes from Arduino

Hi There!

I'm trying to send serial data (bytes in an array) from my Arduino to a robot (lobot robotic arm) with no luck so far. I've tried sending data as a byte array, e.g.
'''
void loop() {
byte buf[payloadSz] = {0x55,0x55,0x08,0x03,0x01,0xE8,0x03,0x01,0xD0,0x07};
for (int i = 0; i < payloadSz; i++) {
Serial.write(buf*);*
_ Serial.print(buf*,HEX);_
_
}_
_
}_
_
'''*_
serial.write shows that it successfully sends the correct bytes, but the device I am sending it to response with a generic error.
Not sure how to further debug. Some advice and insights would be much appreciated!

Could you please provide some more information about your issue? The better you prepare the question the more likely we will be able to help.

Which Arduino board are you using?
How is it connected to the robotoc arm?
Link to the data sheets of the robot arm.
Also some information about what you have already tested.
How does the device respond with a generic error?
Also often the error is in the code you are not showing. Best is, when you provide a minimal but complete example that shows the issue.

Someone with 6 posts should know to post complete programs and in code tags. The original code probably did not have italics.

some1_tbd:
Not sure how to further debug. Some advice and insights would be much appreciated!

Neither do we unless you can provide us a link to the datasheet of the robotic arm you're trying to communicate with

Should you not be using indexes when sending your data, such as:

.
.
.
    Serial.write(buf[i]);
    Serial.print(buf[i],HEX);
.
.
.

Blackfin:
Should you not be using indexes when sending your data, such as:

.

.
.
    Serial.write(buf[i]);
    Serial.print(buf[i],HEX);
.
.
.

The result of OP not using code tags; note the italics.

sterretje:
The result of OP not using code tags; note the italics.

Ah right. Thanks.

no luck so far

What problems have you encountered ?