The friendly Operating System for the Internet of Things

Interface definition for the TMP006 sensor driver. More...

Detailed Description

Author
Johann Fischer j.fis.nosp@m.cher.nosp@m.@phyt.nosp@m.ec.d.nosp@m.e

Definition in file tmp006.h.

#include <stdint.h>
#include <stdbool.h>
#include "periph/i2c.h"
+ Include dependency graph for tmp006.h:

Go to the source code of this file.

Data Structures

struct  tmp006_t
 Device descriptor for TMP006 sensors. More...
 

Macros

#define TMP006_I2C_ADDRESS   0x41
 TMP006 Sensor Default Address.
 
#define TMP006_CONVERSION_TIME   1E6
 Default Conversion Time in us.
 
#define TMP006_CONFIG_CR_AS1   0x00
 Conversion Time 0.25 s, AVG Samples: 1.
 
#define TMP006_CONFIG_CR_AS2   0x01
 Conversion Time 0.5 s, AVG Samples: 2.
 
#define TMP006_CONFIG_CR_AS4   0x02
 Conversion Time 1 s, AVG Samples: 4.
 
#define TMP006_CONFIG_CR_AS8   0x03
 Conversion Time 2 s, AVG Samples: 8.
 
#define TMP006_CONFIG_CR_AS16   0x04
 Conversion Time 4 s, AVG Samples: 16.
 
#define TMP006_CONFIG_CR_DEF   TMP006_CONFIG_CR_AS4
 Default for Testing.
 
#define TMP006_CCONST_S0   6.4E-14
 Calibration Factor.
 
#define TMP006_CCONST_A1   1.75E-3
 Constant $a_{\mathrm{1}}$.
 
#define TMP006_CCONST_A2   -1.678E-5
 Constant $a_{\mathrm{2}}$.
 
#define TMP006_CCONST_TREF   298.15
 Constant $T_{\mathrm{REF}}$.
 
#define TMP006_CCONST_B0   -2.94E-5
 Constant $b_{\mathrm{0}}$.
 
#define TMP006_CCONST_B1   -5.7E-7
 Constant $b_{\mathrm{1}}$.
 
#define TMP006_CCONST_B2   4.63E-9
 Constant $b_{\mathrm{2}}$.
 
#define TMP006_CCONST_C2   13.4
 Constant $c_{\mathrm{2}}$.
 
#define TMP006_CCONST_LSB_SIZE   156.25E-9
 Sensor Voltage Register LSB Size.
 

Functions

int tmp006_test (tmp006_t *dev)
 TMP006 sensor test. More...
 
int tmp006_init (tmp006_t *dev, i2c_t i2c, uint8_t address, uint8_t conv_rate)
 Initialize the TMP006 sensor driver. More...
 
int tmp006_reset (tmp006_t *dev)
 Reset the TMP006 sensor. More...
 
int tmp006_set_active (tmp006_t *dev)
 Set active mode, this enables periodic measurements. More...
 
int tmp006_set_standby (tmp006_t *dev)
 Set standby mode. More...
 
int tmp006_read (tmp006_t *dev, int16_t *rawv, int16_t *rawt, uint8_t *drdy)
 Read sensor's data. More...
 
void tmp006_convert (int16_t rawv, int16_t rawt, float *tamb, float *tobj)
 Convert raw sensor values to temperature. More...