This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why do we need to encode data in Heart Rate Measurement profile?

Hello,

Looking into the characateristic of Heart Rate BLE profile, I've come accross to the function hrm_encode(ble_hrs_t * p_hrs, uint16_t heart_rate, uint8_t * p_encoded_buffer), and I start to wonder, why do we need to encode the data with this function? What is the benefit?

Furthermore, if I would do my own characteristic based on the hrm profile where I send a float instead of an uint16_t for instance, should I change this function?

Thanks in advance

Related