This article applies to:
Experiment Author: Psychology Software Tools, Inc.
This experiment uses a TMP36 sensor to obtain and display the ambient temperature.
The script in the experiment animates the thermometer increasing or decreasing the temperature until it reaches the appropriate temperature.
NOTE: Accuracy depends on the sensor used. See the datasheet in the .zip file for more information. Psychology Software Tools used the I/O Expander in our configuration. However, the Auxiliary I/O Breakout cable may be used as well.
Analog Input 2 was used in PST's configuration which was set as the ADChan in the GetTemp InLine. The scale was adjusted to 0-3.3 so Volts are obtained when retrieving the .Value. Analog Input 2 was selected over Analog Input 1 since Analog Input 1 has a protection diode.
Analog Output 1 was used to power the sensor. However, you may supply +5V (instead of 3.3V) to the TMP36 sensor. The sensor operates from 2.7V and upward. The output of the sensor is independent of the input voltage.
ValueScaled and ValueRaw is recorded and logged.
To get Celsius, we take the ValueRaw and calculate it based of the voltage registered.
Please sign in to leave a comment.