1 #ifndef WipperSnapper_I2C_Driver_BH1750_H 2 #define WipperSnapper_I2C_Driver_BH1750_H 60 _bh1750->setQuality(BH1750_QUALITY_HIGH);
77 lightEvent->light =
_bh1750->getLux();
85 #endif // WipperSnapper_I2C_Driver_BH1750 WipperSnapper_I2C_Driver_BH1750(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a BH1750 sensor.
Definition: WipperSnapper_I2C_Driver_BH1750.h:31
bool begin()
Initializes the BH1750 sensor and begins I2C. The set the quality to the H-Resolution Mode...
Definition: WipperSnapper_I2C_Driver_BH1750.h:54
Class that provides a driver interface for a BH1750 Light sensor.
Definition: WipperSnapper_I2C_Driver_BH1750.h:20
bool getEventLight(sensors_event_t *lightEvent)
Performs a light sensor read using the One Time Measurement feature of the BH1750. The sensor goes to Power Down mode after each reading.
Definition: WipperSnapper_I2C_Driver_BH1750.h:75
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
uint16_t _sensorAddress
The I2C driver's unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
hp_BH1750 * _bh1750
Pointer to BH1750 light sensor object.
Definition: WipperSnapper_I2C_Driver_BH1750.h:82
~WipperSnapper_I2C_Driver_BH1750()
Destructor for a BH1750 sensor.
Definition: WipperSnapper_I2C_Driver_BH1750.h:42
TwoWire * _i2c
Pointer to the I2C driver's Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321