Skip to main content
Temperature sensor raw data value calculation logic
Albert Basiul avatar
Written by Albert Basiul
Updated over 7 months ago

Description:

Temperature sensor raw data is represented in 16 bit signed integer data type, the 16bit signed integer range is from 0 to 65535 (-32768 to +32767).

Temperature sensor IOs positive values are represented by values between 0x0000 to 0x7FFF (in DEC from 0 to 32767).

Negative values are represented by subtracting 65535 from values between 0x8000-0xFFFF (in DEC from 32768 to 65535).

For example, the received value from the BT temperature sensor is 64635. Because 64635>32767, we need to do the following:
(64635 - 65535) * 0.01 = -9.00 degrees Celsius

([Received value] - 65535) * 0.01
0.01 is the number by which we must multiply the received from BT temperature sensor result, these numbers can be different for each parameter and are mentioned in FMIO list under "Multiplier" column for each parameter where such multiplier should be applied.

This logic applies to any mentioned in FMIO list parameter with data type - Signed int.

More info about Signed integer and 16-bit computing can be found here:
16-bit computing
Signed integer

Did this answer your question?