Write a Struct using ArduinoBLE library
What format should i use?

int writeValue(const uint8_t value[], int length);


And what is the best way to cast the Struct to the format?

writeValue((uint8_t *)&amp;myStruct, sizeof(myStruct));