Struct tmp006::Tmp006

source ·
pub struct Tmp006<I2C> { /* private fields */ }
Expand description

TMP006 device driver.

Implementations

Create new instance of the TMP006 device.

Destroy driver instance, return I²C bus instance.

Enable the sensor (default state).

Sensor and ambient continuous conversion.

Note: calling this clears the data-ready bit.

Disable the sensor (power-down).

Note: calling this clears the data-ready bit.

Reset the sensor (software reset).

Note: calling this clears the data-ready bit.

Enable DRDY pin.

Note: calling this clears the data-ready bit.

Disable DRDY pin.

Note: calling this clears the data-ready bit.

Set the ADC conversion rate.

Note: calling this clears the data-ready bit.

Read the object temperature in Kelvins.

This uses the sensor voltage and ambient temperature as well as an input calibration factor.

The input calibration factor can be calculated with the formulas provided in the [TMP006 user guide]. Typical values are between 5*10^-14 and 7*10^-14

TMP006 user guide

Calculate the object temperature in Kelvins.

Given the sensor data and a calibration factor.

The input calibration factor can be calculated with the formulas provided in the [TMP006 user guide]. Typical values are between 5*10^-14 and 7*10^-14

TMP006 user guide

Read the data from the sensor.

These values can be used to calculate the object temperature as done in read_object_temperature().

Reads whether there is data ready to be read.

When this returens false it means that a conversion is in progress.

Read the manufacturer ID.

This is per default 0x5449.

Read the device ID.

This is per default 0x0067.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.