Sending byte array via serial


I want to send a byte message.

The message is 6 bytes long and looks like this:

Byte 1: 0x00; //flag
Byte 2: 0x01;
Byte 3: 0x58;
Byte 4: 0xB1;
Byte 5: 0x06;
Byte 6: 0xff;

I want to use the serial send (TX) to send these bytes.
The values are hexadecimal.

Is it ok to just seperately use Serial.Write() each byte?


Yes, or use Serial.write() on the whole byte array:

Serial.write(myBytes, 6);