Create bytearray to transmit