Printing real numbers (decimal points) in FRDM-KW36 SDK

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Printing real numbers (decimal points) in FRDM-KW36 SDK

345 次查看
SeokJin
Contributor II

Hello.

I am utilizing one of the examples in the KW36 SDK, "Low Power Temperature Sensor and Collector". IDE verson is [MCUXpresso IDE v11.8.1_1197]

In this example, I understand that the server device measures the temperature and transmits it to the client device.

Currently, temperature is expressed in integer form (e.g. 20 degrees Celsius), but I would like a more accurate measurement.

I want to measure temperature in decimals and output it to Putty.

 

What should I do if I want the temperature, which is currently displayed as "20 degrees Celsius", to be displayed as "20.xx degrees Celsius"?

 

Among the BLE temp collector.c codes, "SerialManager.c" seems to be set to only output integer format.

SeokJin_0-1711526820660.png

 

 

Which part and how should I modify to output the value in real number form?

 

I'm waiting for your reply. Thanks in advance.

Regards,

SeokJin.

标签 (1)
0 项奖励
回复
1 回复

329 次查看
nxf77486
NXP TechSupport
NXP TechSupport

Hello,

Thank you for contacting NXP support.

You are correct currently we only have an API to send this information as an integer format number, and we do not have an API for floating or real number form on the Serial Manager support, but this does not mean this could not be achieved this result.  But in this case we do not have a proper solution to suggest for this.

Please let me know if there is anything else where I can help you, and we apologize for this inconvenient.

0 项奖励
回复