Assigning value to a struct byte order So i have struct:
typedef struct sendPacketStruct {
  byte header = headerByte;//0x55
  unsigned int time;//2 bytes
  int height;//2 bytes
};

And i do this:
    sendPacketStruct sendPacket;

    sendPacket.time = 84;//0x54
    sendPacket.height = 100;//0x65
    
    Serial.write((byte*)&amp;sendPacket, sizeof(sendPacket));

But when i receive it at the other end the hex bytes are:
55 54 00 64 00
So the first byte is correct as the header 0x55, but the 2x 2 byte values time and height are there but shifted.
eg it should be 00 54 not 54 00
The answer is that arduino is little endian, so the byte order is correct. I was just expecting big endian order as ive seen in some other network protocols. If that is desired instead I can just do some bit shifting and re-arranging.