You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
446 B
C
20 lines
446 B
C
#ifndef HTU21D_H //Definicion del archivo para header
|
|
#define HTU21D_H
|
|
|
|
#define HTU21D_ADDR 0x40 //Definition of sensor address direction
|
|
|
|
//Commands for reading of temperature or humidity
|
|
#define HTU21D_TEMP 0xE3
|
|
#define HTU21D_HUM 0xE5
|
|
#define HTU21D_RESET 0xFE
|
|
|
|
//Function declarations
|
|
// Temperature:
|
|
int get_temp(int fd, double *temp);
|
|
// Humidity:
|
|
int get_hum(int fd, double *hum);
|
|
// Reset:
|
|
int reset_sensor(int fd);
|
|
|
|
#endif
|