Help with programming a motor controller

Pretty much as you have it there, but (1) the byte values that code sends do not match the sequence you described, (2) you could write the byte values as hex literals for clarity, since that's how they're specified (3) the buffer is bigger than needed for that message so you would be sending some uninitialised bytes at the end of the command. You should send the number of bytes in your message, and not the whole buffer if that is bigger. You don't actually need to use the buffer at all - you could just Serial.write((byte)0x80); etc to output each byte in sequence.