Send an array of byte with serial.write using struct


I need send by serial.write() a struct, only the 18 bytes must be send, no one before ou after.

typedef struct{

uint64_t timeStamp=1568924432342; //8 bytes
uint16_t stationNameSize=8; //2 bytes 'required'
String stationName="station1"; //8 bytes


If I do:

Envelope envelope;

It should be work? There is another way ? thankss :slight_smile:

sizeof (String) is always six, IIRC