Erriez BH1750 library for Arduino  1.1.2
This is a GY-302 breakout with an I2C BH1750 digital light sensor.
Macros
ErriezBH1750_regs.h File Reference

BH1750 digital light sensor library for Arduino. More...

This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

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.

Macro Definition Documentation

◆ GET_TIMEOUT

#define GET_TIMEOUT (   mode)
Value:
((((mode) & BH1750_RES_MASK) == ResolutionLow) ? \
4 lx resolution
Definition: ErriezBH1750.h:47
#define BH1750_CONV_TIME_H
Worst case conversion timing high res.
#define BH1750_RES_MASK
Mode resolution mask bits.
#define BH1750_CONV_TIME_L
Worst case conversion timing low res.

Macro low/high resolution timeout from mode

Definition at line 81 of file ErriezBH1750_regs.h.

◆ IS_CONTINUES_MODE

#define IS_CONTINUES_MODE (   mode)    (((mode) & BH1750_MODE_MASK) == ModeContinuous)

Macro is continues mode enabled

Definition at line 63 of file ErriezBH1750_regs.h.

◆ IS_INITIALIZED

#define IS_INITIALIZED (   mode)    (((mode) & BH1750_MODE_MASK) != 0x00)

Return if mode is set (initialized)

Definition at line 57 of file ErriezBH1750_regs.h.

◆ IS_LOW_RESOLUTION

#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.

◆ IS_ONE_TIME_MODE

#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.