Skip to content

TMP102 Thermometer

lbuild module: modm:driver:tmp102

The TMP102 is a digital temperature sensor with an I2C interface and measures temperature over a range of -40 to +125 deg Celsius with a resolution of 1/16 (0.0625) deg C and an accuracy of up to 0.5 deg C.

The sensor has a default refresh rate of 4Hz but can be set from 0.25Hz up to 33Hz using setUpdateRate(rate). The sensor will then read itself when calling the update() method frequently.

However, you may manually start a conversion with startConversion(), wait for 30ms and then readTemperature() to achieve other (less frequent) update rates.

Dependencies

modm:driver:tmp102 modm_driver_tmp102 modm: driver: tmp102 modm_architecture_i2c_device modm: architecture: i2c.device modm_driver_tmp102->modm_architecture_i2c_device modm_architecture_register modm: architecture: register modm_driver_tmp102->modm_architecture_register modm_driver_lm75 modm: driver: lm75 modm_driver_tmp102->modm_driver_lm75 modm_math_utils modm: math: utils modm_driver_tmp102->modm_math_utils modm_processing_protothread modm: processing: protothread modm_driver_tmp102->modm_processing_protothread