Contiki-NG
|
Files | |
file | tmp102.c |
Driver for the TMP102 temperature sensor. | |
file | tmp102.h |
Header file for the TMP102 Sensor Driver. | |
Functions | |
void | tmp102_init (void) |
Initialiser for the TMP102 sensor driver. | |
uint8_t | tmp102_read (uint16_t *data) |
Get a temperature reading from the TMP102 sensor. | |
Generic TMP102 sensor | |
#define | TMP102_ADDR 0x48 |
TMP102 slave address. | |
#define | TMP102_TEMP 0x00 |
TMP102 temperature data register. | |
Driver for the TMP102 sensor
The TMP102 driver returns the converted temperature value in centiCelsius with 2 digits precision, to get Celsius just divide by 100.
uint8_t tmp102_read | ( | uint16_t * | data | ) |
Get a temperature reading from the TMP102 sensor.
< TMP102 slave address
< TMP102 temperature data register
< TMP102 slave address
Definition at line 52 of file tmp102.c.
References i2c_burst_receive(), i2c_master_error(), and i2c_single_send().