SHT11 Device Driver. More...

Detailed Description

SHT11 Device Driver.

Freie Universit├Ąt Berlin, Computer Systems & Telematics

Definition in file sht11.h.

#include <stdint.h>
+ Include dependency graph for sht11.h:

Go to the source code of this file.

Data Structures

struct  sht11_val_t
 sht11 measureable data More...


#define SHT11_NO_ACK   (0)
 don't ack read in read_byte
#define SHT11_ACK   (1)
 do acknowledge read in read_byte
#define SHT11_STATUS_REG_W   (0x06)
 will write to status register
#define SHT11_STATUS_REG_R   (0x07)
 will read from status register
#define SHT11_MEASURE_TEMP   (0x03)
 tell sensor to measure temperature
#define SHT11_MEASURE_HUMI   (0x05)
 tell sensor to measure humidity
#define SHT11_RESET   (0x1E)
 reset the sensor
#define SHT11_DATA_WAIT   (1)
 time to wait after toggling the data line
#define SHT11_CLK_WAIT   (1)
 time to wait after toggling the clock line
#define SHT11_MEASURE_TIMEOUT   (1000)
 set measurement timeout to 1 second


enum  sht11_mode_t { TEMPERATURE = 1, HUMIDITY = 2 }
 SHT11 modes that can be measured.


void sht11_init (void)
 Initialize SHT11 ports.
uint8_t sht11_read_sensor (sht11_val_t *value, sht11_mode_t mode)
 Read sensor. More...
uint8_t sht11_write_status (uint8_t *p_value)
 Write status register. More...
uint8_t sht11_read_status (uint8_t *p_value, uint8_t *p_checksum)
 Read status register with checksum. More...