How can I get the temperature in decimal?
it should be between 36°C to 39°C
my logs:
it should be between 36°C to 39°C
B4X:
sub Healt_Thermometer(Characteristics As Map)
For Each id As String In Characteristics.Keys
If id = "2A1C" Then 'Temperature
Dim ArrayBytes () As Byte = Characteristics.Get(id)
Dim bc As ByteConverter
Log("Temp Hex: "&bc.hexFromBytes(Characteristics.Get(id)))
Log("Temp2: "&ArrayBytes(id))
end if
End sub
my logs:
characteristic: 2A1C
Temp Hex: 06B00E00FEDC070C050B092704
Temp2: 14
Temp Hex: 06D40E00FEDC070C050B0A0604
Temp2: 14
Temp Hex: 06F80E00FEDC070C050B0A2104
Temp2: 14
Temp Hex: 061C0F00FEDC070C050B0B0004
Temp2: 15
Temp Hex: 06400F00FEDC070C050B0B1B04
Temp2: 15
Temp Hex: 06640F00FEDC070C050B0B3604
Temp2: 15
Temp Hex: 06840F00FEDC070C050B0C1504
Temp2: 15
Temp Hex: 06600F00FEDC070C050B0C3004
Temp2: 15
Temp Hex: 063C0F00FEDC070C050B0D0F04
Temp2: 15
Temp Hex: 06180F00FEDC070C050B0D2A04
Temp2: 15
Temp Hex: 06F40E00FEDC070C050B0E0904
Temp2: 14