NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
float SensorTemperature ( const byte &  port)
inline

Read the LEGO Temperature sensor value.

Return the temperature sensor value in degrees celcius. Since a temperature sensor is an I2C digital sensor its value cannot be read using the standard Sensor(n) value. The port must be configured as a temperature sensor port before using this function. Use SetSensorTemperature to configure the port.

Parameters
portThe port to which the temperature sensor is attached. See the Input port constants group. You may use a constant or a variable.
Returns
The temperature sensor value in degrees celcius.
Examples:
ex_SensorTemperature.nxc.