From BlueMelon
The sensor is a temperature dependent resistor. When the voltage over such a resistor is measured it is possible to determine the temperature. However the temperature does not increase linearly with the measured voltage. This means that for example the temperature is 2 degrees at a measured voltage of 1000mV, 4 degrees at value 1200mV and 10 degrees at value 1300mV. So it's not possible to accurately determine the temperature with a few simple formulas. In most cases however the sensor's datasheet contains a table with resistance values and their corresponding temperatures. These values can be used in the following Max MSP patch to accurately determine the temperature.
The top block is needed to establish the connection between Max MSP(tm) and the BlueSense usb (wireless) router. T
The middle block contains the analog input module. The first argument of the "analog input" module is its identification number. Every BlueSense module has its own identification number which never changes. The id can be found on the module itself, and can also be found by checking the module table of the BlueSenseMaster component.
The block below contains the objects needed to convert the digital value to a temperature. First the setdomain message specifies the range of input values. For a ten bit resolution these are values from 0 to 1024. The setrange message determines the minimum and maximum output temperature values. In this case from -10 to +50 degrees celsius. The clear message removes all points from the chart. The messages on the right allow you to add points. For example the message 650 8.0 specifies that the temperature is 8 degrees when a digital value of 650 is read by the analog input device.