2024-09-11 04:36 PM - last edited on 2024-09-12 10:36 AM by Andrew Neil
I have a program that updates a ble characteristic where it gets displayed on the stm32 toolbox app as however many bytes I set it to in Stm32CubeMX. This which makes sense in terms of default configurations, but if I wanted to display a float value instead how would I go about that?
For reference im using Custom_STM_App_Update_Char() to updating the value where If I pass in a float it gets converted to bytes automatically.
2024-09-12 10:14 AM
Hello @Hichamm
Could you please clarify your needs.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-09-12 02:31 PM
I have a custom BLE service with a characteristic being continuously updated by my program. This characteristic value is displayed on apps such as ST BLE Toolbox and Nrf Connect where I can see the value changing every time it gets updated, but it is displayed as bytes. This makes sense as Custom_STM_App_Update_Char() uses an array of bytes as a parameter rather than a float but I want to see the data displayed as a float value instead.
2024-09-16 02:22 PM
@STTwo-32 any ideas on how to achieve this?
2024-09-17 12:42 AM
Hello @Hichamm
I don't think it is as easy as you said. Maybe a good way is to prepare your data and decode it on an array of bytes, send this array and on the reception, re-built the float from the received data (using a secondary application or something else).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.