< div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >我想读一些从DA14583我只是传感器数据得到的。为此,我使用了树莓派3模型B,它将建立与传感器的连接。 在Pi上使用gatttool,我能够通过蓝牙连接到设备,我从温度传感器(其中0x20是相应传感器的处理程序地址)获得一些值:句柄:0x0020, char属性:0x10, char值句柄:0x0021, uuid:[此处省略]
$ char-read-hnd 0x20
>10 21 00 06 24 40 3f 18 26 97 b0 bb 44 44 7d 70 89 a7 2e
问题是,我不知道如何从中获得一个人类可读的温度值。
在IBM's,我发现了一些代码片段,以转换成°C和°F。它是Python,但可以很容易地转换为,例如,JavaScript。
但这是一个不同的传感器,它只需要4个十六进制块。 I've tried it with any sequence from the above 19 hex blocks, but none gave me a reasonable value.
So, does anyone know how to convert these 19 hex blocks into a temparature between 20°C and 25°C (which it assumingly represents)? I'd be really grateful!