【发布时间】:2014-09-09 08:29:05
【问题描述】:
我很难在温度中转换两个字节。 我有一个控制单元(温度传感器),我可以在其中收到带有两个字节的温度消息。
1) 示例:
message: [ 40 ][ 25 ]
LSBYTE : [ 40 ]
MSBYTE : [ 25 ]
0.03125 C/bit
temperature: 25C° ( seen from the display of the control unit )
2) 示例:
message: [ 40 ][ 26 ]
LSBYTE : [ 40 ]
MSBYTE : [ 26 ]
0.03125 C/bit
temperature: 30C° ( seen from the display of the control unit )
3) 示例:
message: [ 20 ][ 26 ]
LSBYTE : [ 20 ]
MSBYTE : [ 26 ]
0.03125 C/bit
temperature: 32C° ( seen from the display of the control unit )
4) 示例:
message: [ c0 ][ 25 ]
LSBYTE : [ c0 ]
MSBYTE : [ 26 ]
0.03125 C/bit
temperature: 29C° ( seen from the display of the control unit )
我不知道如何将消息转换为温度。
我请求您的支持。 谁能给我一个解决方案,它可以在我的项目中协作(创建一个应用程序android来接收来自控制单元的消息)
【问题讨论】:
标签: android temperature can-bus