Erriez BH1750 library for Arduino
1.1.2
This is a GY-302 breakout with an I2C BH1750 digital light sensor.
|
BH1750 digital light sensor library for Arduino. More...
Go to the source code of this file.
Macros | |
#define | BH1750_I2C_ADDR_L 0x23 |
I2C address with ADDR pin low. | |
#define | BH1750_I2C_ADDR_H 0x5C |
I2C address with ADDR pin high. | |
#define | BH1750_POWER_DOWN 0x00 |
Power down instruction. | |
#define | BH1750_POWER_ON 0x01 |
Power on instruction. | |
#define | BH1750_RESET 0x07 |
Reset instruction. | |
#define | BH1750_MODE_MASK 0x30 |
Mode mask bits. | |
#define | BH1750_RES_MASK 0x03 |
Mode resolution mask bits. | |
#define | BH1750_CONV_TIME_L 24 |
Worst case conversion timing low res. | |
#define | BH1750_CONV_TIME_H 180 |
Worst case conversion timing high res. | |
#define | IS_INITIALIZED(mode) (((mode) & BH1750_MODE_MASK) != 0x00) |
#define | IS_CONTINUES_MODE(mode) (((mode) & BH1750_MODE_MASK) == ModeContinuous) |
#define | IS_ONE_TIME_MODE(mode) (((mode) & BH1750_MODE_MASK) == ModeOneTime) |
#define | IS_LOW_RESOLUTION(mode) (((mode) & BH1750_RES_MASK) == ResolutionLow) |
#define | GET_TIMEOUT(mode) |
BH1750 digital light sensor library for Arduino.
Source: https://github.com/Erriez/ErriezBH1750 Documentation: https://erriez.github.io/ErriezBH1750
Definition in file ErriezBH1750_regs.h.
#define GET_TIMEOUT | ( | mode | ) |
Macro low/high resolution timeout from mode
Definition at line 81 of file ErriezBH1750_regs.h.
#define IS_CONTINUES_MODE | ( | mode | ) | (((mode) & BH1750_MODE_MASK) == ModeContinuous) |
Macro is continues mode enabled
Definition at line 63 of file ErriezBH1750_regs.h.
#define IS_INITIALIZED | ( | mode | ) | (((mode) & BH1750_MODE_MASK) != 0x00) |
Return if mode is set (initialized)
Definition at line 57 of file ErriezBH1750_regs.h.
#define IS_LOW_RESOLUTION | ( | mode | ) | (((mode) & BH1750_RES_MASK) == ResolutionLow) |
Macro is low resolution enabled from mode
Definition at line 75 of file ErriezBH1750_regs.h.
#define IS_ONE_TIME_MODE | ( | mode | ) | (((mode) & BH1750_MODE_MASK) == ModeOneTime) |
Macro is one-time mode enabled from mode
Definition at line 69 of file ErriezBH1750_regs.h.