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
-
port | The 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.