XIAO nrf52840 ArduinoBLE 1 central, 2 peripherals

I think the float data is 4 bytes 32 bits.
If you are sending 4 float numbers,

#define dataNum 16                  // roll, pitch, yaw, Vbatt (4 float data 16 bytes)
union unionData {                   // Union for bit convertion 32 <--> 8
  float     dataBuff32[dataNum/4];  // float : 32bit
  uint8_t   dataBuff8[dataNum];
};

You can confirm this by sending and receiving an easy-to-understand number.

1 Like