adding the htu21d.h file
parent
ba498bc55b
commit
1aefd46ac6
@ -0,0 +1,19 @@
|
|||||||
|
// Gerardo Marx 1/oct/2026
|
||||||
|
// HTU21D temperature and humidity sensor library
|
||||||
|
// tested in a raspberry pi zero w
|
||||||
|
|
||||||
|
#ifndef HTU21D_H
|
||||||
|
#define HTU21D_H
|
||||||
|
|
||||||
|
// commands and i2c address
|
||||||
|
#define ADDR 0x40 //i2c address
|
||||||
|
#define HUM 0xE5 // hold master humidity command
|
||||||
|
#define TEMP 0xE3
|
||||||
|
#define RESET 0xFE
|
||||||
|
|
||||||
|
// prototype functions:
|
||||||
|
int getTemp(int fd, double *temp);
|
||||||
|
|
||||||
|
int getHum(int fd, double *hum);
|
||||||
|
|
||||||
|
#endif // THU21D_H
|
||||||
Loading…
Reference in New Issue