This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 Send float data

Other Parts Discussed in Thread: CC2541

Hi everyone,

I hope you can guide me in an easy question. I am involved with it some days and I can not solved it yet. 

I am working with "heart rate sensor" project example for CC2541, and I would like to know what I would need to change if I wanted to send a float data instead of an uint8 data in the battery service.

Could you guide me in this process? In advance, it seems it should not be very difficult...

Thank you very much. 

 

  • I would advice you not to use floats in 8051 processor architectures (processor in CC2541), as floating point operations are not supported and this will then generate a lot of code . Instead you can use an array of uint8 bytes. See how this is implemented in the devinfoservice.c.