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.
17 lines
494 B
C
17 lines
494 B
C
#ifndef BH1750_h //Definicion del archivo para header
|
|
#define BH1750_h
|
|
|
|
#define BH1750_ADDR 0x23 //Definition of sensor address direction
|
|
|
|
//Commands for reading of temperature or humidity
|
|
#define BH1750_PON 0x01 //Command for power on
|
|
#define BH1750_OTHR 0x20 //Command for One Time H-Resolution
|
|
#define BH1750_RESET 0xFE //Command for Reset the sensor
|
|
|
|
//Function declarations
|
|
// Get the brightness:
|
|
int get_lux(int fd, double *lux);
|
|
// Reset:
|
|
int reset_BH1750(int fd);
|
|
|
|
#endif |