Contiki-NG
Loading...
Searching...
No Matches

Driver for the TMP102 sensor. More...

Files

file  arch/platform/zoul/dev/tmp102.c
 Driver for the TMP102 temperature sensor.
file  arch/platform/zoul/dev/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.

Detailed Description

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.

Function Documentation

◆ tmp102_read()

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().