This experiment uses a TMP36 sensor to get the ambient temperature.
The script will animate the thermometer increasing or decresing the temperature until it reaches the appropiate temperature.
Note that accuracy will depend on the sensor used. See the datasheet for more information.
We used the I/O Expander in our configuration. However, you may use the Auxiliary I/O Breakout cable as well.
In our configuration, we used Analog Input 2, which is set as the ADChan in the GetTemp InLine. The scale was adjusted to 0-3.3 so we get Volts when retrieving the .Value. Analog Input 2 was chosen over Analog Input 1 since Analog Input 1 has a protection diode.
Analog Output 1 was used to power the sensor. 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.
Accuracy will vary depending on temperature and sensor grade as outlined in the datasheet.