Temperature Entity

Certain modules have a temperature measurement available. The temperature entity gives access to these measurements. Check your module datasheet to see if your module has a temperature entity.

Temperature (Get)

temperature [ index ] . getTemperature => (int) microcelsius

Returns a temperature measurement in microcelsius.

Code Examples

C++

// All commands return aErr values when errors are encountered and aErrNone on
// success. Get commands fill the variable with the returned value.

stem.temperature[0].getTemperature(microcelsius);

Reflex

//Get commands fill the variable with the returned value.

stem.temperature[0].getTemperature(microcelsius);

Python

microcelcius = stem.temperature[0].getTemperature();
print microcelcius.value